diff options
| author | William Boman <william@redwill.se> | 2021-10-31 12:05:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-31 12:05:44 +0100 |
| commit | 14b64a21e850eee2b9b351c92394e33df57a7f08 (patch) | |
| tree | a77c72d348d944060d912dcc6b104a61b3d81785 /doc | |
| parent | scripts: fix generating filetypes for servers w/ no lspconfig entry (diff) | |
| download | mason-14b64a21e850eee2b9b351c92394e33df57a7f08.tar mason-14b64a21e850eee2b9b351c92394e33df57a7f08.tar.gz mason-14b64a21e850eee2b9b351c92394e33df57a7f08.tar.bz2 mason-14b64a21e850eee2b9b351c92394e33df57a7f08.tar.lz mason-14b64a21e850eee2b9b351c92394e33df57a7f08.tar.xz mason-14b64a21e850eee2b9b351c92394e33df57a7f08.tar.zst mason-14b64a21e850eee2b9b351c92394e33df57a7f08.zip | |
server: add attach_buffers() method (#220)
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/nvim-lsp-installer.txt | 31 |
1 files changed, 26 insertions, 5 deletions
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 |
