Closed TBD9rain closed 2 months ago
How do you set languageserver.verible
?
textDocument/diagnostic request
Looks like you've enabled pullDiagnostic.onSave
in your coc-settings.json, coc.nvim pulls diagnostics from server multiple times.
My languageserver.verible
configuration:
"languageserver": {
"verible":{
"enable": true,
"command": "verible-verilog-ls",
"filetypes": ["verilog", "systemverilog"],
"disabledFeatures": ["diagnostics"], // fix output repeated identical messages
"trace.server": "messages"
}
}
The pullDiagnostic.onSave
is disabled as default.
Any other pluuDiagnostic
settings in your coc-settings.json? textDocument/diagnostic
request won't be sent if pull mode disabled.
I didn't make any change of pullDiagnostic
.
And the other language server doesn't send the textDocument/diagnostic
request.
Here is my coc-settings.json.
{
// coc setting
"coc.preferences.extensionUpdateCheck": "weekly",
"coc.preferences.maxFileSize": "2MB",
// completion setting
"suggest.autoTrigger": "always",
"suggest.noselect": false,
"suggest.enablePreselect": true,
"suggest.completionItemKindLabels": {
"text": "", // "v"
"method": "", // "f"
"function": "", // "f"
"constructor": "", // "f"
"field": "", // "m"
"variable": "", // "v"
"class": "", // "C"
"interface": "", // "I"
"module": "M", // "M"
"property": "", // "m"
"unit": "U", // "U"
"value": "", // "v"
"enum": "E", // "E"
"keyword": "", // "k"
"snippet": "", // "S"
"color": "", // "v"
"file": "", // "F"
"reference": "", // "r"
"folder": "", // "F"
"enumMember": "e", // "m"
"constant": "", // "v"
"struct": "", // "S"
"event": "", // "E"
"operator": "", // "O"
"typeParameter": "T", // "T"
"default": "" // ""
},
// code diagnostic
"diagnostic.enable": true,
"diagnostic.enableMessage": "always",
"diagnostic.refreshOnInsertMode": false,
"diagnostic.checkCurrentLine": true,
"diagnostic.virtualText": false,
"diagnostic.errorSign": "",
"diagnostic.warningSign": "",
"diagnostic.infoSign": "",
"diagnostic.hintSign": ">>",
// CodeLens
"codeLens.enable": true,
// languae server
"languageserver": {
"verible":{
"enable": true,
"command": "verible-verilog-ls",
"filetypes": ["verilog", "systemverilog"],
"disabledFeatures": ["diagnostics"], // fix output repeated identical messages
"trace.server": "message"
},
"svls":{
"enable": false,
"command": "svls",
"filetypes": ["verilog", "systemverilog"],
"trace.server": "message"
}
}
}
The verible language server enabled pull mode capability.
The repeated diagnostics:
set disabledFeaturs: ["diagnostics"], and the diagnostic message was only displayed once.
This disabled the first one, client ignored the published diagnostics.
coc.nvim is a LSP client, the server should not use both push and pull diagnostics at the same time, or provide a configuration to disable one.
Result from CocInfo
Describe the bug
I'm using verible (v0.0-3638-ge3ef2a37) as a language server in my gvim (v9.0.1897) with coc.nvim (v0.0.82-84ce0312). It will display two duplicated messages to one warning.
The lsp log is as follows:
I tried to set
disabledFeaturs: ["diagnostics"]
, and the diagnostic message was only displayed once. However, the lsp log is as identical.It seems that the problem is the one more
textDocument/diagnostic
request.Reproduce the bug
Screenshots (optional)