Neovim-from-scratch
Neovim-from-scratch copied to clipboard
gopls disable diagnostic
I realize this isn't an issue Neovim-from-scratch at all but if you can suggest a fix or strategy for investigating it I'd very much appreciate it.
I see in your lsp handlers you disable document_formatting
for tssserver
.
I am trying to disable diagnostic messages for gopls
but don't seem to find the correct parameter.
I can view the config with
:lua c=vim.lsp.get_active_clients(); for k,v in pairs(c) do if v.name == "gopls" then print(vim.inspect(v)) end end
@tlelson I did a little bit of digging and may have found the option to disable the diagnostics for gopls
:
Try giving the change to handlers.lua a whirl and let me know if that worked for you.
thanks for taking the time to look at this @mrbrianrt . This didn't work for me unfortunately.
Using neovim v0.8.0 (nightly) I get:
defined in the language server protocol
Error executing vim.schedule lua callback: /home/delubu/.config/nvim/lua/user/lsp/handlers.lua:83: attempt to index field 'languageServerExperimentalFeatures' (a nil value)
stack traceback:
/home/delubu/.config/nvim/lua/user/lsp/handlers.lua:83: in function '_on_attach'
...ck/packer/start/nvim-lspconfig/lua/lspconfig/configs.lua:280: in function '_setup_buffer'
...ck/packer/start/nvim-lspconfig/lua/lspconfig/configs.lua:183: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
And on v0.7.2 (latest) I get:
Error executing vim.schedule lua callback: /home/delubu/.config/nvim/lua/user/lsp/handlers.lua:83: attempt to index field 'languageServerExperimentalFeatures' (a nil value)
stack traceback:
/home/delubu/.config/nvim/lua/user/lsp/handlers.lua:83: in function '_on_attach'
...ck/packer/start/nvim-lspconfig/lua/lspconfig/configs.lua:280: in function '_setup_buffer'
...ck/packer/start/nvim-lspconfig/lua/lspconfig/configs.lua:183: in function ''
vim/_editor.lua: in function <vim/_editor.lua:0>
Do you have a suggestion for how to identify the correct setting? Although I appreciate your effort, I would like to understand it better myself. Do you think I should be able to look into lsp client object like so and see the variable to set/unset?
:lua c=vim.lsp.get_active_clients(); for k,v in pairs(c) do if v.name == "gopls" then print(vim.inspect(v)) end end```