Skip to content

terraform: Add semantic token support#3535

Merged
ericdallo merged 2 commits intoemacs-lsp:masterfrom
psibi:tf-semantic-token
May 22, 2022
Merged

terraform: Add semantic token support#3535
ericdallo merged 2 commits intoemacs-lsp:masterfrom
psibi:tf-semantic-token

Conversation

@psibi
Copy link
Member

@psibi psibi commented May 21, 2022

Summary of the changes:

  • Make these variables buffer local:
    • lsp-semantic-token-faces
    • lsp-semantic-token-modifier-faces

The main reason for it is that a particular client will have more semantic tokens associated with them and making them buffer local makes it work seamlessly across different languages.

  • Convert the variable lsp-semantic-tokens-capabilities to lsp--semantic-tokens-capabilities function so that the initialization
    message to the language server is passed correctly.

  • Add complete semantic token support for terraform lanuage. This has been tested using the official Hashicorps terraform language server.

Summary of the changes:

- Make these variables buffer local:
  - lsp-semantic-token-faces
  - lsp-semantic-token-modifier-faces

The main reason for it is that a particular client will have more
semantic tokens associated with them and making them buffer local
makes it work seamlessly across different languages.

- Convert the variable lsp-semantic-tokens-capabilities to
lsp--semantic-tokens-capabilities function so that the initialization
message to the language server is passed correctly.

- Add complete semantic token support for terraform lanuage. This has
been tested using the official Hashicorps terraform language server.
@github-actions github-actions bot added client One or more of lsp-mode language clients semantic-tokens labels May 21, 2022
Copy link
Member

@ericdallo ericdallo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericdallo ericdallo merged commit eac730f into emacs-lsp:master May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client One or more of lsp-mode language clients semantic-tokens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants