-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve highlighting of primitive type declarations #27
Comments
Are we sure, we want to use Some findings: Looking at our grammar, we're already using Looking at other languages (e.g. TypeScript), We're using I think a more consistent way would be to use |
The main reason is that What you're suggesting makes sense 👍🏻 but I'm not sure how well we can map that to the default semantic tokens here: On that note I'd be curious to see how any language server with semantic highlighting solves this - I'm guessing they get away with e.g. |
Problem Statement
This is to follow up on hashicorp/terraform-ls#827 which introduces semantic highlighting of type declarations.
Type declarations are highlighted by the server as
keyword
.Our grammar currently highlights them as
storage.type
which seems to result in a different association in the default VSCode themes.https://github.com/hashicorp/vscode-terraform/blob/c8b0154b8d2cc4cd67b4e68065ad6b85f8e133a8/syntaxes/terraform.tmGrammar.json#L49-L53
Grammar (only) Highlighting
Semantic Highlighting
Expected User Experience
Grammar and semantic highlighting are more aligned, i.e. type declarations are highlighted as keywords in the grammar too.
Proposal
Update
terraform_type_keywords
matcher?The text was updated successfully, but these errors were encountered: