genoma / vim-less

Vim Less syntax highlighting
http://www.vim.org/scripts/script.php?script_id=4892
Vim License
16 stars 3 forks source link

workaround issue #4

Closed JulesWang closed 9 years ago

JulesWang commented 10 years ago

I see you fixed a issue by overriding cssTagNames and cssDeprecated.

div { font-size: 20px; } written on one line, is identified as cssDeprecated (fixed with a temporary workaround)

How can I reproduce this issue? Is this issue still there without the workaround?

Besides, I'm planing to submit a less syntax file to Bram, would you like to be the maintainer?

genoma commented 10 years ago

Sorry for the wait, i've had 2 busy weeks and missed your post.

The issue, if I can remember well, can be reproduced simply removing the override from line 19:

syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP,cssTagName,cssDeprecated

For what it concerns the submission of the Less syntax file to Bram, i would be more than happy to be the maintainer.

JulesWang commented 10 years ago

Still could not reproduce it.

Anyway, let's work together to make the less syntax file better.

The first thing for you is adding a header(your email and other useful info) in the less syntax file, then we may fix some bugs and add more features.

genoma commented 10 years ago

I have added some infos to the header of the syntax files, plus added a branch to test the issue with the incorrect syntax highlighting.

I have added a new folder test with a less file which should be enough to verify the issue.

The problem manifests itself on the new branch issue#4

JulesWang commented 10 years ago

Have you tried it with the latest css.vim?

genoma commented 10 years ago

Yes I have and the syntax highlight on the branch issue#4 is still wrong on one line declarations as

span { font-size: 30px; }

Of course on the master branch everything is working correctly.

JulesWang commented 9 years ago

Ok, I've got the code, "syn region lessDefinition matchgroup=cssBraces start="{" end="}" contains=TOP" and reproduced the bug.

It is more tricky than I thought.

JulesWang commented 9 years ago

I have submitted a commit to address this issue.

https://github.com/JulesWang/css.vim/commit/33ab453e1759323b469957e3323eea3d772386dd

genoma commented 9 years ago

Yep you got it right, nice.

Now i believe i should add as a mandatory dependency your updated CSS syntax file in the readme before merging the branch.

JulesWang commented 9 years ago

Yes, indeed. As you have confirmed the fix, this issue will be closed.