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: diagnostics not updating #105

Merged
merged 2 commits into from
Mar 4, 2024
Merged

Conversation

benlubas
Copy link
Contributor

@benlubas benlubas commented Mar 4, 2024

fixes an issue mentioned in conversation in #81

No longer will you have to write the file twice to see the most up to date diagnostics! The reason that this was happening before is that we just weren't giving the LS long enough to give up new diagnostics before trying to refresh them. This caused some really really annoying behavior.

This PR makes use of the DiagnosticChagned event (which I didn't know existed until a few hours ago) to update diagnostics in the buffers we're interested in after the LS has updated the diagnostics.

I've also fixed a few small bugs in sync_raft which were previously only just using more CPU cycles, they were messing with this change, causing diagnostics to flicker.

as I'm writing this, i remembered that I didn't update the deactivate method. I'll do that quickly before I go to sleep. I don't need to do that.

@jmbuhr jmbuhr self-requested a review March 4, 2024 08:20
lua/otter/keeper.lua Show resolved Hide resolved
@benlubas benlubas requested a review from jmbuhr March 4, 2024 15:54
Copy link
Owner

@jmbuhr jmbuhr left a comment

Choose a reason for hiding this comment

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

Perfect, thank you so much for all your contributions!

@jmbuhr jmbuhr merged commit 8bdc078 into jmbuhr:main Mar 4, 2024
3 checks passed
@benlubas benlubas deleted the fix/double_write branch March 4, 2024 16:44
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.

2 participants