The vscode extension currently uses a TextMate grammar to do syntax highlighting with regular expressions. This works well enough and is fast.
The LSP also allows for semantic tokens i.e. semantic highlighting, which can be used to distinguish between different types of tokens. For example, a "name" could be a type, function, parameter, local variable, object field/method, etc, which requires semantic (i.e. AST) information to determine.
IMO this would be a minor improvement and I'm concerned about the potential performance impact, but I would support it as an optional feature. It should be easy to implement because I think the language server only needs to return a list of tokens and their semantic type, which can be ripped from the AST.
Just realized the big use case for semantic highlighting would be to highlight the task scripts (Bash, Python, etc), which should be possible with AST info.
The vscode extension currently uses a TextMate grammar to do syntax highlighting with regular expressions. This works well enough and is fast.
The LSP also allows for semantic tokens i.e. semantic highlighting, which can be used to distinguish between different types of tokens. For example, a "name" could be a type, function, parameter, local variable, object field/method, etc, which requires semantic (i.e. AST) information to determine.
IMO this would be a minor improvement and I'm concerned about the potential performance impact, but I would support it as an optional feature. It should be easy to implement because I think the language server only needs to return a list of tokens and their semantic type, which can be ripped from the AST.