Skip to content

Semantic highlighting #8

Closed
Closed
@bentsherman

Description

@bentsherman

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions