Reduce flickering syntax highlighting on initial load #680
Labels
enhancement
New feature or request
terraform-ls
Features/bugs which will be implemented/fixed purely on the LS side
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
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
Proposal
LS to tell client to refresh tokens when it knows that schema has changed hashicorp/terraform-ls#344
The text was updated successfully, but these errors were encountered: