Closed adigitoleo closed 3 years ago
Merging #439 (918b111) into main (0c16693) will decrease coverage by
3.65%
. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #439 +/- ##
==========================================
- Coverage 73.44% 69.78% -3.66%
==========================================
Files 313 313
Lines 23976 23713 -263
==========================================
- Hits 17609 16548 -1061
- Misses 6367 7165 +798
Could you share screenshots of the higlighting before and after the change ? I do not use vim personally and it would help me see if this patch makes vim highlighting closer to the other ones.
Before
Default neovim colorscheme:
My colorscheme:
After
Default neovim colorscheme:
My colorscheme:
This code doesn't work: the syntax at the second button is broken. That is to show the "spurrious" highlighting with the current syntax file, which is something I discovered by accident. Mainly I'm just sharing this for the fix to the ::
operator which can be followed by a newline (the original regex didn't check for this).
I thought I would add a definition for attr
while I am at it. Now I realise that func
could also deserve special treatment... Or I can forgo these if it's inconsistent with the other editor tools.
In the new commit I have made attr
and func
use the same definition as enamldef
, which looks consistent with python's class
and def
keywords, let me know what you think:
That is looking good. Note that alias could use the same treatment as attr and func. Just for you to know here is how it looks for me under VS Code which is based on the Sublime text syntax highlighting.
Thanks for your time and help, I've added alias
as a special keyword also.
There are other improvements that could be made (making special groups for the word after alias
or attr
as in the VScode example) but I'm not confident at adding it this time (I'd need to understand vim syntax highlighting files a bit more). If you want, we can wait for that, or just add these corrections first.
The improvements you made are already quite nice so I will merge those now. And you are obviously welcome to make another PR later. Thanks for your contribution !
This fixes spurrious highlighting of characters immediately preceding or following an enamlOperator. Also, the case of the notification operator
::
followed by and EOL is now handled correctly. Lastly, theattr
keyword is highlighted using the Define group (like python decorators, etc.)