KubaP / glsl-lsp

A language server implementation for the OpenGL Shading Langauge, written in Rust.
12 stars 1 forks source link

Non-semantic highlighting #14

Open KubaP opened 6 months ago

KubaP commented 6 months ago

The VS Code client already supports semantic highlighting information received from the server, but semantic highlighting is only available "in context", which basically means within an editor/project that the server is operating on. Everywhere else, only non-semantic highlighting using TextMate grammars is used:

TextMate grammar rules are a bit of a clusterfuck; the "standard" tokens are very precise in some areas but very imprecise in others. Plus, there really is no standard either, though it seems most editors and themes have settled on some common tokens. Given the complexity of writing regex rules to tokenize a non-trivial programming language, I think it's probably best to steal an existing TextMate grammar definition for a language like C and then modify it to work with GLSL.

Some potentially useful references:

Tasks