Vader gets different results than vim for synID in clojure test code
- Dominant language
- Vim Script
- Stars
- 599
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the clojure syntax files that come with my version of vim: 7.4.52. Using vader ad7f1b70ebcf76de86d1991732146f2ebabe3ba4.
When I write a test that tests clojure syntax, I get different results from vader and manually stepping through the test. (My project idbrii/vim-endoscope uses syntax ids to determine if something is a string as described in `:help searchpair()`.)
Here's an example of a passing and failing test where the difference is that the line ends in a quote.
```
Given clojure (simple valid function):
(defn say-hello
([name] (println (str "Hello " name))))
Do (remove trailing braces, add brace, check syn):
# Clear out the trailing braces
jf)D
# Add brace and check syntax
a)\=synIDattr(synID(line("."), col('.')-1, 0), "name")\
Expect clojure (Append clojureParen. Works fine for word-parens.):
(defn say-hello
([name] (println (str "Hello " name)clojureParen
Do (remove trailing braces, add string and brace, check syn):
# Clear out the trailing braces
jf)D
# Add string and brace and check syntax
a "!")\=synIDattr(synID(line("."), col(".")-1, 0), "name")\
Expect clojure (FIXME: Append clojureParen. Vader fails for quote-paren, but this works in vim.):
(defn say-hello
([name] (println (str "Hello " name "!")clojureParen
```
Inside my vader file, the syntax for embedded clojure is all messed up (it shows most trailing parens as errors -- even for balanced parens) and that also applies to my Do blocks.
Not sure if you can fix this. I also tried using ;-terminated blocks, but that doesn't help.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.