9

I'd like to write a language server to VSCode with semantic highlight support. The language I'm using has very complex rules, so I'd like not to rely on a tokenizer to distinguish between identifiers and keywords.

I already have a language service in VS Community, where I've written my own Classifier. It's possible to write own classifier in VSCode, or the only way to colorize a document is add TextMate language specification file to a VScode package?

Gama11
  • 31,714
  • 9
  • 78
  • 100
zdenek
  • 21,428
  • 1
  • 12
  • 33
  • 1
    I would recommand that your create a language server which uses the https://github.com/Microsoft/language-server-protocol , so you'll be able to plug it to all clients supporting this protocol (VSCode right now, upcoming Eclipse Che and Eclipse IDE). However, this protocol misses things about syntax highlighting. ATM, the most portable approach still seems to be a textmate file. – Mickael Sep 02 '16 at 10:42

1 Answers1

0

Semantic coloring is not supported by the LSP as of VS Code 1.29.

There are two main issues currently tracking this feature:

Matt Bierner
  • 58,117
  • 21
  • 175
  • 206
  • 5
    Both of these issues, as of 2021, have been resolved. LSP version 3.16 (released December 2020) now supports semantic highlighting, and in March 2020 the VSCode API was merged with https://github.com/microsoft/vscode/issues/86415 – heckj Mar 16 '21 at 22:40