Closed parker789 closed 3 years ago
apparently the server doesn't support textDocument/documentSymbol so nothing we can do there.
@teto - shouldn't my :lua print(vim.inspect(vim.lsp.buf_get_clients()))
command output the language server, instead of just {}
? It seems that the problem here isn't with your comment, but with the fact that tsserver isn't actually loading?
the log shows it can't start tsserver apparently.
[ DEBUG ] 2020-12-10T19:09:01-0500 ] /usr/local/share/nvim/runtime/lua/vim/lsp/rpc.lua:489 ] "decoded" { error = { code = -32603, message = "Request initialize failed with message: Couldn't find 'tsserver' executable or 'tsserver.js' module" }, id = 1, jsonrpc = "2.0"}
Yeah, and I haven't installed anything manually. This is all using :LspInstall tsserver
, which from the output in my initial post shows that it's installed correctly
I recommand to install tsserver on your own. lspconfig tries to do too much and I hope we can get rid of LspInstall tsserver
.
Seems that it was a simple issue in that I didn't have typescript installed globally: npm install -g typescript
. It'd probably be helpful to add that into the documentation for setting things up!
With your last comment, I'd gladly install tsserver manually, but is there documentation regarding setting binary paths, or would everything have to be in my path?
that's the thing, there are just so many ways and every setup is different that we can't ensure LspInstall SERVER
works.
Either the server binary is in PATH and yhou can just reference its name or it's not and you have to use the full path. business as usual :)
;) haha, yep. thanks
Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/share/nvim"
Run :checkhealth for more info
:LspInstallInfo { tsserver = { bin_dir = "/home/xxx/.cache/nvim/lspconfig/tsserver/node_modules/.bin", binaries = { ["typescript-language-server"] = "/home/xxx/.cache/nvim/lspconfig/tsserver/node_modules/.bin/typescript-language-server" }, install_dir = "/home/xxx/.cache/nvim/lspconfig/tsserver", is_installed = true } }