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

fix: update extmarks unconditionally #515

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

apollo1321
Copy link
Contributor

@apollo1321 apollo1321 commented Oct 30, 2024

Fixes #509
But I am not sure if it is a good solution. Maybe it is better to check if the virtual text has changed? It will be harder to implement and probably will require creating special namespace for extmarks or maintaining list of extmarks for each context window.
@lewis6991, what do you think?

@lewis6991
Copy link
Member

lewis6991 commented Oct 30, 2024

I'm not sure this is the best solution. My idea was just to have additional triggers, it won't catch everything, but the main one is just diagnostics which we can special case for now.

Maybe for the general case we can define a user autocmd which can be called?

@apollo1321
Copy link
Contributor Author

My idea was just to have additional triggers, it won't catch everything, but the main one is just diagnostics which we can special case for now.

Hm, I think we can support special case for Diagnostic. We can add force_update in render.open function. And set this flag in true only for DiagnosticChanged event. Also, it will be necessary to change throttling to support force_update.

Maybe for the general case we can define a user autocmd which can be called?

Are you suggesting providing an API that allows users to manually trigger a context update?

@lewis6991
Copy link
Member

Are you suggesting providing an API that allows users to manually trigger a context update?

Potentially. Need to know the use cases first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Diagnostic virtual text is not updated in the treesitter context
2 participants