aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-02-12 23:48:09 +0100
committerWilliam Boman <william@redwill.se>2022-02-12 23:48:09 +0100
commit4613344d6ec42b94221d5297947e6d82eaeca31d (patch)
tree12a855a29d8a3d8e5bb1bd1e487b443166961591
parentadd r_language_server (#467) (diff)
downloadmason-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.
-rw-r--r--README.md32
-rw-r--r--doc/nvim-lsp-installer.txt30
2 files changed, 1 insertions, 61 deletions
diff --git a/README.md b/README.md
index 9f121c23..b78cf5dc 100644
--- a/README.md
+++ b/README.md
@@ -121,37 +121,7 @@ lsp_installer.on_server_ready(function(server)
end)
```
-For more advanced use cases you may also interact with more APIs nvim-lsp-installer has to offer, for example the
-following (refer to `:help nvim-lsp-installer` for more docs).
-
-```lua
-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
-```
+For more advanced use cases you may also interact with more APIs nvim-lsp-installer has to offer, refer to `:help nvim-lsp-installer` for more docs.
### Configuration
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*