guns / vim-clojure-static

Meikel Brandmeyer's excellent Clojure runtime files
Other
420 stars 50 forks source link

Attempt to avoid errors on aliased 'contains' #52

Open cursork opened 10 years ago

cursork commented 10 years ago

Users with vim-clojure-static and vim-clojure-highlight see errors and broken highlighting when opening some test files. The culprit is [midje.sweet :refer :all] as that includes a function contains. And this is illegal in Vim:

syntax keyword clojureFunc foo contains bar
" E395: contains argument not accepted here

Similarly a couple of other words (oneline, concealends) will not be recognised; but I'd be very surprised if they turned up in much code!

Note that my example code attached still doesn't highlight 'contains' correctly - for the life of me I can't figure out why as the regular expression generated appears under clojureFunc when I call :syntax and pasting that regexp into a manual :syntax match is fine.

guns commented 10 years ago

Thanks Neil, this sounds awfully familiar; I must have broken your fix to this very same problem when refactoring for the new syntax_keyword variables. Using syntax match for just the outliers sounds like a good solution; I'll take a look at this in the evening.

cursork commented 10 years ago

Ha sorry - it seemed familiar to me too but I managed to convince myself I was imagining it! For some unknown reason :anguished:

Thanks for taking a look.

For reference: https://github.com/guns/vim-clojure-highlight/pull/1

glittershark commented 9 years ago

:+1:

EduardoMRB commented 9 years ago

:+1:

Olical commented 8 years ago

Any chance of getting this merged? Biting me a little now too.

fuadsaud commented 7 years ago

Any reason this hasn't been merged yet?

guns commented 7 years ago

I believe there was, but I'll have another look.

lucasalencar commented 5 years ago

Is there any temporary fix that we could do to avoid this issue? I am experiencing the same issue