lite-xl-lsp
lite-xl-lsp copied to clipboard
Error on gopls start
LSP config:
local lspconfig = require "plugins.lsp.config"
...
lspconfig.gopls.setup {
command = {
"gopls"
},
settings = {
Lua = {
diagnostics = {
enable = false
}
}
},
verbose = true
}
Updated config with absolute gopls path, now getting this:
I think the issue is you are adding settings that are specifically for the lua language server:
lspconfig.gopls.setup {
command = {
"gopls"
},
-- settings = { -- these settings are for the lua language server not gopls
-- Lua = {
-- diagnostics = {
-- enable = false
-- }
-- }
-- },
verbose = true
}
A simple setup call lspconfig.gopls.setup() should be enough to enable the go language server.
With a generic lspconfig.gopls.setup() I have this issue, that's why I've ended up with explicit args.
Could be that your gopls is not the direct binary but a bash/shell script that points to it which makes the lsp not properly detect the real process id of running lsp server. Try from terminal with which gopls to see the path of invoked gopls binary and then confirm it is the real gopls binary and not a shell script invoking it.
Right, it was a soft linked into /usr/local/bin/gopls as far as binary located in ~/go/bin and can't be located by editor.
Also, tried this approach:
lspconfig.gopls.setup {
command = {
"/Users/yuriizinets/go/bin/gopls"
}
}
Getting this error
pylsp and pyright meets the same error
Is this still an issue?