Closed ruanyouxing closed 2 years ago
Hello! How do you set up the servers in your config? Does it work if you use the example setup snippet in the README? Make sure you don't call require('lspconfig').ltex.setup{}
anywhere, you need to set things up via nvim-lsp-installer for the neovim LSP client to be able to locate the executable.
My config here
It seems like you're missing the setup part. That snippet will only automatically install those servers if they're not already installed.
Try adding the following to your config
local lsp_installer = require("nvim-lsp-installer")
-- Register a handler that will be called for all installed servers.
-- Alternatively, you may also register handlers on specific server instances instead (see example below).
lsp_installer.on_server_ready(function(server)
local opts = {}
-- (optional) Customize the options passed to the server
-- if server.name == "tsserver" then
-- opts.root_dir = function() ... end
-- end
-- This setup() function is exactly the same as lspconfig's setup function.
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
server:setup(opts)
end)
the server worked maybe, but it multiples itself
it still doesn't work when i edit
the server worked maybe, but it multiples itself
Make sure you don't call lsp_installer.on_server_ready()
more than one time. It seems like you're setting up the server multiple times (it should only be done once).
it still doesn't work when i edit
What more exactly doesn't work? What's the behavior you're expecting?
yes i just call it once
@ruanyouxing I found your public nvim files and opened a PR that should fix the multiplication issue
@ruanyouxing I found your public nvim files and opened a PR that should fix the multiplication issue
thank you
To me it seems like this can now be closed
Problem description
I install ltex for LaTeX, but first, it have no attached server when i open a .tex file i tried require('lspconfig').ltex.setup{} When i run LspInfo:
Neovim version (>= 0.6)
NVIM v0.6.1 Build type: Release LuaJIT 2.0.5 Compiled by builduser
Operating system/version
Linux
I've recently downloaded the latest plugin version of both nvim-lsp-installer and nvim-lspconfig
Affected language servers
ltex
Actual behavior
ltex started
Expected behavior
ltex installed but didn't work,maybe no executable
LspInstallInfo output
Installation log
Healthcheck
Screenshots
No response