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

No diagnostics for the first file opened with neovim #1575

Open
gergaly opened this issue Jan 7, 2025 · 1 comment
Open

No diagnostics for the first file opened with neovim #1575

gergaly opened this issue Jan 7, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@gergaly
Copy link

gergaly commented Jan 7, 2025

Describe the bug
Diagnostics are not run for the first file because 'textDocument/didOpen' arrived before initial indexing is done.

To Reproduce
Start neovim with an erlang file.

Expected behavior
The file diagnostics requests should be handled during initial indexing. Two possible ways:

  1. Cancel request and give the LSP client a chance to resend the request later
  2. Queue the requests and process them after the initial indexing is done.

Actual behavior
Diagnostics are not run for the first file during the session and a log message is issued:

[2025-01-07T11:17:31.798810+01:00] [info] Initial indexing is not done, skip running diagnostics for imagine_module_name_here [els_diagnostics:run_diagnostics/1 L124] <0.153.0>

Context

  • erlang_ls version (tag/sha): 1.1.0
  • Editor used: neovim 0.10.2
  • LSP client used: neovim, lazy.nvim and nvim-lspconfig
@gergaly gergaly added the bug Something isn't working label Jan 7, 2025
@gergaly
Copy link
Author

gergaly commented Jan 7, 2025

My proof of concept fix for the "Queue requests" way:
main...gergaly:erlang_ls:delay

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant