-
Notifications
You must be signed in to change notification settings - Fork 132
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
Support workspace/semanticTokens/refresh #344
Comments
Updated the module store to have a set of hooks to perform when an event is performed. Added a hook to send a When started the editor appears as expected, initial highlighting covers all the expected tokens except Further investation is warranted to determine whether this is a problem with my implementation or with the rendering engine inside VSCode. |
Add ModuleChangeHooks to trigger semantic token refresh when specified parts of the schema are discovered after initialization. Fixes #344
Add ModuleChangeHooks to trigger semantic token refresh when specified parts of the schema are discovered after initialization. Fixes #344
Add ModuleChangeHooks to trigger semantic token refresh when specified parts of the schema are discovered after initialization. Fixes #344
* Enable Semantic Token Refresh Add ModuleChangeHooks to trigger semantic token refresh when specified parts of the schema are discovered after initialization. Fixes #344
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. |
Current Version
Use-cases
Semantic token based highlighting is fully dependent on schema. Schema may change at runtime, even after it is initially obtained because, e.g.:
Proposal
Add change hooks to the
StateStore
which can be added when we're setting up the session and state stores, somewhere hereterraform-ls/internal/langserver/handlers/service.go
Lines 406 to 410 in 0059475
The hook will need to check (via metadata in
filesystem.DocumentStorage
) whether the module has any open files currently and if so, then sendworkspace/semanticTokens/refresh
notification to prompt the client to recompute semantic tokens.Hooks can be implemented within the
StateStore
using memdb'sDefer
function on any relevant transactions.The text was updated successfully, but these errors were encountered: