Spawning language server with cmd`diagnostic-languageserver`failed

Diposting pada

Spawning language server with cmd`diagnostic-languageserver`failed. The language server is either not installed, missing from PATH, or not executable
https://i.stack.imgur.com/UvXgH.png
” Spawning language server with cmd: diagnostic-languageserver failed. The language server is either not installed, missing from PATH, or not executable ”
nvim problem i copied devaslife’s dotfiles and installed plugin yesterday it work, but today i entered LSP info after that when i Enter shows that the error

Answer
Probably, it’s because you have not set up the right programming language that you are using in the lspconfig.rc.vim, precisely in the nvim_lsp.tsserver.setup part.
I had the same problem because I was in javascript file (.js) and the lsp config that I was using from someone else only supports typescript files. So, I just had to add the javascript, javascriptreact and javascript.jsx. For example :
nvim_lsp.tsserver.setup {
on_attach = on_attach,
filetypes = { “typescript”, “typescriptreact”, “typescript.tsx”, “javascript”, “javascriptreact”, “javascript.jsx” },
capabilities = capabilities
}

 37 total views,  1 views today

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *