diff options
| author | William Boman <william@redwill.se> | 2022-02-12 23:48:09 +0100 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-02-12 23:48:09 +0100 |
| commit | 4613344d6ec42b94221d5297947e6d82eaeca31d (patch) | |
| tree | 12a855a29d8a3d8e5bb1bd1e487b443166961591 /doc | |
| parent | add r_language_server (#467) (diff) | |
| download | mason-4613344d6ec42b94221d5297947e6d82eaeca31d.tar mason-4613344d6ec42b94221d5297947e6d82eaeca31d.tar.gz mason-4613344d6ec42b94221d5297947e6d82eaeca31d.tar.bz2 mason-4613344d6ec42b94221d5297947e6d82eaeca31d.tar.lz mason-4613344d6ec42b94221d5297947e6d82eaeca31d.tar.xz mason-4613344d6ec42b94221d5297947e6d82eaeca31d.tar.zst mason-4613344d6ec42b94221d5297947e6d82eaeca31d.zip | |
docs: remove "advanced" example snippet
There wasn't much thought put into this snippet, it was just added as an
example of what one could do. The snippet happens to demonstrate how to
automatically install servers - this is however already documented (in a
different fashion) in the Wiki.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/nvim-lsp-installer.txt | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt index 358b8ba2..cc9d56f5 100644 --- a/doc/nvim-lsp-installer.txt +++ b/doc/nvim-lsp-installer.txt @@ -101,36 +101,6 @@ Then, somewhere in your initialization script (see `:h init.lua`): > Make sure you don't also set up your servers via lspconfig (e.g. `require("lspconfig").clangd.setup {}`)! -For more advanced use cases you may also interact with more APIs -nvim-lsp-installer has to offer, for example the following: > - - local lsp_installer_servers = require('nvim-lsp-installer.servers') - - local servers = { - "rust_analyzer", - "clangd", - "pyright", - } - - -- Loop through the servers listed above and set them up. If a server is - -- not already installed, install it. - for _, server_name in pairs(servers) do - local server_available, server = lsp_installer_servers.get_server(server_name) - if server_available then - server:on_ready(function () - -- When this particular server is ready (i.e. when installation is finished or the server is already installed), - -- this function will be invoked. Make sure not to also use the "catch-all" lsp_installer.on_server_ready() - -- function to set up your servers, because by doing so you'd be setting up the same server twice. - local opts = {} - server:setup(opts) - end) - if not server:is_installed() then - -- Queue the server to be installed. - server:install() - end - end - end -< ============================================================================== COMMANDS *nvim-lsp-installer-commands* |
