vim-clojure-static icon indicating copy to clipboard operation
vim-clojure-static copied to clipboard

Attempt to avoid errors on aliased 'contains'

Open cursork opened this issue 10 years ago • 8 comments

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.

cursork avatar Jun 06 '14 17:06 cursork

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.

guns avatar Jun 06 '14 18:06 guns

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

cursork avatar Jun 06 '14 18:06 cursork

:+1:

glittershark avatar Dec 24 '14 18:12 glittershark

:+1:

EduardoMRB avatar Jan 09 '15 16:01 EduardoMRB

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

Olical avatar Aug 08 '16 22:08 Olical

Any reason this hasn't been merged yet?

fuadsaud avatar Feb 24 '17 13:02 fuadsaud

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

guns avatar Feb 24 '17 15:02 guns

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

lucasalencar avatar Jan 21 '19 13:01 lucasalencar