Replies: 7 comments 7 replies
-
😅
Good question. I actually avoided the error highlighting until someone asked for it in #2960. To be honest, I don't immediately have a good suggestion here other than
You could use the let g:vimtex_syntax_custom_cmds = [
\ {
\ 'name': 'varappend',
\ 'mathmode': 1,
\ 'arggreedy': 1,
\ 'argspell': 0,
\ },
\] Although, I'm not 100% sure if it will work in your case since you have the optional argument after the first argument. So, you may need something more advanced here. Still, it's not too hard to make a custom rule that should work if the above is not enough. |
Beta Was this translation helpful? Give feedback.
-
Hmmm.... only for dark mode users 😂 ? Anyway, in this case, |
Beta Was this translation helpful? Give feedback.
-
Only for you, since you are the owner -- we plebs can't see it since it's not enabled in the settings. |
Beta Was this translation helpful? Give feedback.
-
That was strange. The Discussion feature was activated, but it seems I needed to actually start a discussion to make it available to others. I believe it should be available now? |
Beta Was this translation helpful? Give feedback.
-
GitHub works in mysterious ways... Now I see them! |
Beta Was this translation helpful? Give feedback.
-
I think you know more about LaTeX and TeX than me. You may be right here, of course; I wouldn't really know. I think I would have carelessly and cluelessly added the But ok, perhaps it would make sense to add a possibility to enter math mode by comment? Something like |
Beta Was this translation helpful? Give feedback.
-
If it is not a burden maintaining it, it would be very nice to have them. (Hey, thanks for the discussions! Maybe you can move this issue to a discussion? You should have something like this: on the right-side... ;-) |
Beta Was this translation helpful? Give feedback.
-
This is really not an issue, but I think there is no "Discussion" for vimtex...
Consider the snippet, in the preamble:
Which is highlighted like this: (I have
catppuccin-latte
colorscheme, with a special hl on error):I understand that the
_
underscores are marked as an error because nobody knows that the macro is supposed to be used in math mode. Yes, I can wrap it in\ensuremath{}
, but suppose I prefer not to do that... is there any option to avoid that? Some kind of magic comment?(The spellchecker errors in argument are another nuisance, but not related to
vimtex
, although I'd be grateful for suggestions...)Beta Was this translation helpful? Give feedback.
All reactions