Closed jsit closed 4 years ago
Ah, I'm seeing @amadeus actually explicitly doesn't want this stuff in here:
https://github.com/pangloss/vim-javascript/commit/6c2de10
Not that this is anybody's problem but my own, but out of curiosity, if this shouldn't go here, where should it go? Surely not in the HTML syntax. In a separate syntax file altogether?
Would it be overzealous to define as jsObject
any string that's followed by a period?
syntax match jsObject /\<\K\k*\ze\s*\./
HiLink jsObject Identifier
From MDN: https://developer.mozilla.org/en-US/docs/Web/API/Element#Properties
Not sure if this is the best way to do this. But, for instance, if you are doing something like this in HTML:
the
classList
property there doesn't get properly highlighted, since it doesn't follow a period. Might be useful to be explicit about these, although it also might be smart to limit the context in which they're valid matches.