Skip to content
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

Reduce flickering syntax highlighting on initial load #680

Closed
radeksimko opened this issue Jun 21, 2021 · 2 comments
Closed

Reduce flickering syntax highlighting on initial load #680

radeksimko opened this issue Jun 21, 2021 · 2 comments
Labels
enhancement New feature or request terraform-ls Features/bugs which will be implemented/fixed purely on the LS side

Comments

@radeksimko
Copy link
Member

Problem Statement

User expects configuration syntax to be highlighted as soon as a relevant config file is open, or soon after.

In most cases some early highlighting is provided by static syntax grammar bundled with the VS Code extension (or other editor plugins). This is useful esp. because launching a language server can take some time (seconds) and the file can be highlighted to some extent even before this happens.

Once the language server is launched and ready, it can provide more accurate semantic token based highlighting.

The combination of the above can result in flickering experience, as shown below

2021-05-10 14 03 34

User Impact

This affects all users relying on semantic highlighting (in case of VS Code extension that's all users).

Expected User Experience

User is unlikely to see flickering upon typing and is presented with a file highlighted accurately upon initial load or as soon as possible after (within seconds), i.e. this will be displayed without the user touching the editor after loading the file

Screenshot 2021-05-10 at 14 15 28

Proposal

LS to tell client to refresh tokens when it knows that schema has changed hashicorp/terraform-ls#344

@radeksimko radeksimko added enhancement New feature or request terraform-ls Features/bugs which will be implemented/fixed purely on the LS side labels Jun 21, 2021
@radeksimko
Copy link
Member Author

Addressed via hashicorp/terraform-ls#344 / hashicorp/terraform-ls#630 which was shipped as part of LS 0.26.0, extension 2.21.0

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request terraform-ls Features/bugs which will be implemented/fixed purely on the LS side
Projects
None yet
Development

No branches or pull requests

1 participant