Skip to content

don't do diagnostics when workspace is not ready #2692

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jun 5, 2024

Conversation

folke
Copy link
Contributor

@folke folke commented Jun 4, 2024

Hi!

I created a new Neovim plugin that automatically updates the workspace/library configuration for the active workspace folder based on what files the user has open in Neovim.

It works great and is a lot faster than my older neodev.nvim plugin.

However, one thing I noticed, is that when I send a workspace/didChangeConfiguration, the diagnostics of the currently open files, become all wrong (things like, string, or table does not exist).
After a couple of seconds, they are then replaced by the correct diagnostics.

After debugging, it seems that diagnostics sometimes run, even when the workspace is not ready.

This PR fixes that.

@folke folke force-pushed the workspace_reload branch from b0cd231 to 87581be Compare June 4, 2024 16:59
@abeldekat
Copy link

+one:)

@sumneko sumneko merged commit 7d3e09d into LuaLS:master Jun 5, 2024
11 checks passed
@sumneko
Copy link
Collaborator

sumneko commented Jun 5, 2024

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants