Closed jeffvandyke closed 5 years ago
I'm experiencing this as well, I'd be happy to look into it with some direction :)
@pbondoer As far as a stab at it, I think the problem lies somewhere in the "syntax/javascript.vim" file. My suspicion is the regexes around jsTernaryIf
and jsTernaryIfOperator
, but I'm unfamiliar with the vim syntax rules.
Added in #1165
When working with syntax using https://github.com/tc39/proposal-nullish-coalescing (a
??
operator as a better alternative to||
), highlighting gets confused on surrounding parentheses and braces. My best guess is that it's expecting a ternary statement to follow.I gave fixing it a stab, but I'm not familiar enough with vim syntax highlighting to know what to do. Any help would be appreciated!
Example:
Screenshot: