Skip to content

Different semantic tokens for invalid references #805

@dbanck

Description

@dbanck

After updating the highlighting of constant keywords in hashicorp/syntax#24, semantic tokens should take care of highlighting broken references.

Use-cases

It would be helpful to get feedback when referencing a not-defined variable (or similar item).

CleanShot 2022-02-15 at 17 54 09

Proposal

Instead of highlighting the var keyword differently (see screenshot above), it is proposed to change the highlighting of the reference name. In the example above, non_existing should be highlighted differently.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions