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
Fix(syntax): \lstset syntax highlighting #2001
Conversation
Thanks! I got something wrong in #1999 so I closed it, and opened this PR after I got things work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thanks! I had a very minor comment - I could probably just do that myself, but I also think it was worth suggesting it to allow a reply/additional comment.
Again, thanks! When I looked at it now, I realized: the reason I had the |
@@ -15,8 +15,8 @@ function! vimtex#syntax#p#listings#load(cfg) abort " {{{1 | |||
|
|||
" Match \lstset | |||
syntax match texCmdLstset "\\lstset\>" | |||
\ nextgroup=texLstsetArg,texLstsetGroup skipwhite skipnl | |||
call vimtex#syntax#core#new_arg('texLstsetGroup', { | |||
\ nextgroup=texLstsetArg,texLstsetArg skipwhite skipnl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for duplicate texLstsetArg
. :)
Yes, |
OK! Both github-ci and my local tests seem ok for now. I think the But I would like point out why I did once choose to link to The highlight for In comparasion, the default Vim highlight is more reasonable: |
Great!
Ah, I see. They are not really the same, actually. See here: vimtex/autoload/vimtex/syntax/core.vim Lines 480 to 494 in 1ef97f0
|
I think this was already good now, so I merged. Feel free to suggest further improvements/adjustments (either PR or issues). |
Fixes #2000
Before fix
Note that the red
}
is somehow classified into atexGroupError
:After fix