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

Enable Semantic Token Refresh #630

Merged
merged 2 commits into from
Feb 9, 2022
Merged

Enable Semantic Token Refresh #630

merged 2 commits into from
Feb 9, 2022

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Aug 25, 2021

Add change hooks to the Module state store to trigger token refresh after specified parts of the schema are discovered after initialization.

Fixes #344

@jpogran jpogran changed the title wip Enable Semantic Token Refresh Aug 25, 2021
@jpogran jpogran force-pushed the semantic-token-refresh branch 2 times, most recently from 3ff2cf1 to d6ad22c Compare August 25, 2021 19:05
@jpogran jpogran self-assigned this Aug 25, 2021
internal/state/hooks.go Outdated Show resolved Hide resolved
@jpogran jpogran force-pushed the semantic-token-refresh branch 2 times, most recently from 0b38ab7 to f7f3e7b Compare February 4, 2022 17:47
Add ModuleChangeHooks to trigger semantic token refresh when specified parts of the schema are discovered after initialization.

Fixes #344
@jpogran jpogran requested a review from a team February 8, 2022 17:05
@jpogran jpogran marked this pull request as ready for review February 8, 2022 17:05
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

Thank you for bringing this over the finish line!

LGTM!

I'm not sure if this particular logic can trigger the bug but as a precaution I would perhaps hold on merging until creachadair/jrpc2#78 is addressed - hopefully very soon (creachadair/jrpc2#79).

internal/langserver/handlers/hooks_module.go Outdated Show resolved Hide resolved
@radeksimko
Copy link
Member

The mentioned upstream bug was addressed in #787

Merge at will! :shipit:

@jpogran jpogran merged commit 9ac397b into main Feb 9, 2022
@jpogran jpogran deleted the semantic-token-refresh branch February 9, 2022 13:40
@radeksimko radeksimko mentioned this pull request Mar 1, 2022
2 tasks
@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, 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 Mar 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support workspace/semanticTokens/refresh
2 participants