You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Semantic tokens: overlapping tokens on the PSI path, and injected fragments #2348
The rest of gap 8 of #2334, which #2338 doesn't cover.
Overlapping tokens on the PSI path
For a plugin's own PSI, the highlighting keeps one semantic token per start offset (LazyHighlightInfo[], indexed by the start offset), so a token that starts where another one starts replaces it without a word.
LSP4IJ doesn't declare overlappingTokenSupport, so a server that follows the specification doesn't send overlapping tokens. Some send them anyway.
Not checked: injected fragments, and files with several PSI roots, as template languages have. The highlighting may run analyze once per root, and its tokens may land on the wrong root.
Tests
Overlapping tokens on a file with its own PSI: both tokens are highlighted, or which one wins is decided and documented.
A file with an injected fragment, and one of a template language.
Activity