Closed CodeMyst closed 2 years ago
Hello! Just to rule things out, do you set up servers according to the example setup in the README?
Does the LSP log tell anything interesting? :exe 'tabnew ' .. luaeval("vim.lsp.get_log_path()")
I'm using this config: https://github.com/kabinspace/AstroVim
Looking into the config, looks like it's setup right as far as I can tell:
local status_ok, lsp_installer = pcall(require, "nvim-lsp-installer")
if not status_ok then
return
end
lsp_installer.on_server_ready(function(server)
local opts = {
on_attach = require("configs.lsp.handlers").on_attach,
capabilities = require("configs.lsp.handlers").capabilities,
}
if server.name == "jsonls" then
local jsonls_opts = require "configs.lsp.server-settings.jsonls"
opts = vim.tbl_deep_extend("force", jsonls_opts, opts)
end
if server.name == "sumneko_lua" then
local sumneko_opts = require "configs.lsp.server-settings.sumneko_lua"
opts = vim.tbl_deep_extend("force", sumneko_opts, opts)
end
if server.name == "pyright" then
local pyright_opts = require "configs.lsp.server-settings.pyright"
opts = vim.tbl_deep_extend("force", pyright_opts, opts)
end
server:setup(opts)
end)
Don't see anything in the log: https://paste.myst.rs/ljn8pagi
But it seems like it wants to call the svelteserver
command, and I looked in the lsp folder, but that executable doesn't exist, it looks like a node js project, so either it should be built first somehow, or it should be ran as a node project.
I'll try to run the svelte server lsp from the commandline.
Contents of /home/code/.local/share/nvim/lsp_servers/svelte:
node_modules/
.nmprc
nvim-lsp-installer-receipt.json
package-lock.json
package.json
and the package.json
file contains:
{
"name": "@lsp-installer/svelte.tmp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"svelte-language-server": "^0.14.21"
}
}
there is nothing to run, so it seems like the install of the extension is broken?
i can run node server.js --stdio
in /home/code/.local/share/nvim/lsp_servers/svelte/node_modules/svelte-language-server/bin
there is nothing to run, so it seems like the install of the extension is broken?
Hm what do you mean there is nothing to run? npm will symlink executables inside node_modules/.bin
- this will also be the location which nvim-lsp-installer adds to the PATH used by neovim's LSP client when starting the server. Can you run the executable if you do
$ ./node_modules/.bin/svelteserver --stdio
Ahh didn't see the .bin
folder, yeah i can run it that way.
Cool :+1:. I don't believe there's an issue finding the server executable, sometimes that error message is incorrect. I was hoping the LSP log would say something, as this is most likely caused by the server failing to start
@CodeMyst Are you getting issues if you clone this repo: https://github.com/evanfuture/svelte-microfrontend-example (and run npm install
)?
No issues, ran install
and could also build it and run it.
Ok :+1:. I believe this is an issue with the server and/or the specific project you're experiencing the issue in. Since I don't believe this is an issue with nvim-lsp-installer I'll go ahead and close this. I've also just now created a new issue template for server issues - if you feel like this still is an issue with nvim-lsp-installer please file an issue using that template (makes it much easier for me to reproduce and understand it):
Ah alright. I've tried testing it with multiple projects, I'll tinker a bit more with it, and if I can't figure it out I'll open another issue. :+1:
Problem description
Ran
LspInstall svelte
and it reported as being successful, however opening a svelte file, I don't get any completions, and runningLspInfo
I get this:Other language servers work just fine.
Neovim version (>= 0.6)
Operating system/version
Linux myst 5.13.0-28-generic #31~20.04.1-Ubuntu SMP Wed Jan 19 14:08:10 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
svelte
Actual behavior
Can't run the svelte server.
Expected behavior
Expected to work.
LspInstallInfo output
Installation log
Healthcheck
Screenshots
No response