From 14b64a21e850eee2b9b351c92394e33df57a7f08 Mon Sep 17 00:00:00 2001 From: William Boman Date: Sun, 31 Oct 2021 12:05:44 +0100 Subject: server: add attach_buffers() method (#220) --- doc/nvim-lsp-installer.txt | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index bed9498f..78e2ebab 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -84,8 +84,9 @@ Then, somewhere in your initialization script (see `:h init.lua`): > -- 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/ADVANCED_README.md server:setup(opts) - vim.cmd [[ do User LspAttachBuffers ]] end) < @@ -160,7 +161,9 @@ Example: > } } - lsp_installer.on_server_ready(function (server) server:setup {} end) + lsp_installer.on_server_ready(function (server) + server:setup {} + end) < *nvim-lsp-installer-default-settings* @@ -323,10 +326,28 @@ class: Server Methods: ~ - setup({opts}) - Sets up the language server. This has the same function - signature as the setup function in nvim-lspconfig. + Sets up the language server and attaches all open buffers. + + See: + - setup_lsp({opts}) + - attach_buffers() + + Parameters: ~ + {opts} (table) The lspconfig server configuration. + See https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md + + - setup_lsp({opts}) + Sets up the language server via lspconfig. + This function has the same signature as the setup function + in nvim-lspconfig. + + Parameters: ~ + {opts} (table) The lspconfig server configuration. + See https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md - Refer to nvim-lspconfig for more information on {opts}. + - attach_buffers() + Attaches this server to all current open buffers with a + 'filetype' that matches the server's configured filetypes. - get_default_options() Returns a deep copy of the default options provided to -- cgit v1.2.3-70-g09d2