mint-vscode icon indicating copy to clipboard operation
mint-vscode copied to clipboard

RFC: Semantic Highlighting

Open s0kil opened this issue 4 years ago • 13 comments

The VS Code docs state:

Highlighting based on semantic tokens is considered an addition to the TextMate-based syntax highlighting. Semantic highlighting goes on top of the syntax highlighting. And as language servers can take a while to load and analyze a project, semantic token highlighting may appear after a short delay.

To be honest, I would not mind the tiny delay, Since our language server is built in Crystal, it's fast, and it should not be a problem if we skip the tmLanguage definition. The benefits would be correct highlighting, better maintainability.

For Reference:

  • https://github.com/microsoft/vscode/issues/86415
  • https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview The links on the bottom of the wiki page point to the API which is necessary. It's also important to point out that this Semantic Tokens Spec is not specific to VS Code, It will be part of the next LSP version 3.16.0, so other editors will begin to adopt it.
  • https://github.com/microsoft/vscode-extension-samples/tree/master/semantic-tokens-sample
Copied from conversation at Mint Lobby

s0kil avatar May 03 '20 00:05 s0kil