From 824c6941604fa8a7a4fe56fefcf36b46698314ee Mon Sep 17 00:00:00 2001 From: William Boman Date: Sat, 4 Dec 2021 19:55:07 +0100 Subject: docs: clarify how servers are installed and the recommended setup (#306) --- doc/nvim-lsp-installer.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc') diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index e8666391..5a9794a7 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -42,6 +42,22 @@ https://github.com/williamboman/nvim-lsp-installer/blob/main/CUSTOM_SERVERS.md. ============================================================================== QUICK START *nvim-lsp-installer-quickstart* +nvim-lsp-installer installs server executables in a local directory that +doesn't exist on PATH. In order for the neovim LSP client to be able to locate +these executables, the full path to the executable needs to be provided when +setting up a server. In lspconfig, this is provided via the `cmd` property in +the table provided to the `.setup()` function, for example: > + + lspconfig.sumneko_lua.setup { cmd = { "/path/to/lua-server" } } +< + +The recommended way of setting up your installed servers is to do it directly +through nvim-lsp-installer. By doing so, nvim-lsp-installer will make sure to +inject any necessary properties before calling lspconfig's setup function for +you. You may find a minimal example below. To see how you can override the +default settings for a server, refer to the Wiki: +https://github.com/williamboman/nvim-lsp-installer/wiki/Advanced-Configuration#overriding-the-default-lsp-server-options. + To view the UI for nvim-lsp-installer, run: > :LspInstallInfo -- cgit v1.2.3-70-g09d2