Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to avoid errors on aliased 'contains' #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cursork
Copy link

@cursork cursork commented Jun 6, 2014

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
Copy link
Owner

guns commented Jun 6, 2014

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
Copy link
Author

cursork commented Jun 6, 2014

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

Thanks for taking a look.

For reference: guns/vim-clojure-highlight#1

@glittershark
Copy link

👍

1 similar comment
@EduardoMRB
Copy link

👍

@Olical
Copy link

Olical commented Aug 8, 2016

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

@fuadsaud
Copy link

Any reason this hasn't been merged yet?

@guns
Copy link
Owner

guns commented Feb 24, 2017

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

@lucasalencar
Copy link

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

lucasalencar added a commit to lucasalencar/dotfiles that referenced this pull request Jan 21, 2019
Avoid issue described by this PR
guns/vim-clojure-static#52

Add forked repository with the fix proposed in the PR.
Move vim-polyglot to the end of Plugs to prioritize highlighting that
are declared before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants