Open TBD9rain opened 6 months ago
On every change of the file, the diagnostics are updated. It seems like your editor does not coalesce these ?
There are also two mechanisms diagnostics can be received:
textDocument/publishDiagnostics
)textDocument/diagnostic
), so maybe this is where things get merged and show up multiple times ? Is the "disabledFeatures"
configuration switching the explicit request off ?So things do look like they work as intended, just that the editor does not remove the duplicates.
I'll have a look if it is possible by the editor to request not auto-publishing diagnostics when it actually does the request by itself (maybe there is a setting the editor can send to the language server).
But you should probably also file an issue with your editors' language server implementation to make sure they coalesce the identical diagnostic messages properly or ignore diagnostic notifications when they already request
The "disabledFeatures"
configuration doesn't switch the explicit request off. I think it just diabled one of the messages from diaplaing.
I will file an issue with the language server implementation plugin as well.
Is the "disabledFeatures" configuration switching the explicit request off ?
The disabledFeatures
made coc.nvim ignore publishDiagnostics one.
verible server files the capabilities with diagnosticProvider
, coc.nvim will use pull mode to request to server for diagnostics.
I think the server shouldn't use both publishDiagnostics and diagnosticProvider at the same time, or use publishDiagnostics on document didOpen only, and pull mode for onSave and onChange.
Just chiming in that this is also an issue with https://github.com/neovim/nvim-lspconfig:
It's very straightforward to enable:
-- ~/.config/nvim/after/plugin/lsp.lua
require'lspconfig'.verible.setup{}
I'm not sure what the differences are between the implementation of Verible and other language servers, but this is the only language server that outputs diagnostic messages twice for me.
So maybe we need to change the language server to not auto-publish findings whenever the editor is in a mode where it actively pulls the diagnostics regardless if there was an auto-diagnostic already sent. I am having some vacation coming up, so I might have some time to look at it.
My IDE is as following:
Verible Verilog Language Server built at v0.0-3638-ge3ef2a37
Repeated Warning Messages
The verible-verilog-ls configurations are as following:
When I created a new
.v
file and typed several spaces, repeated identical warning messages popped up:I expect a single warning message per actual issue per file change or analysis trigger. After I configured the language server as following in coc.nvim, the second warning message dissapeared.
But I don't think this is an expected behavior or a long-term solution.
Log Messages
Logs of the preceeding different configurations are smilar except the message timestamps and durations.
Verbose logs of the two configurations are also similar except the message timestamps and durations.