aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-04-05 03:24:59 +0200
committerWilliam Boman <william@redwill.se>2021-04-05 03:45:54 +0200
commit4ab2a7c1ac67a1ad16585c069e131812e6652bf9 (patch)
treeff8e86183a91a61484d0bb831305500853982cd6 /doc
parentuse metatables, more error handling (diff)
downloadmason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.tar
mason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.tar.gz
mason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.tar.bz2
mason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.tar.lz
mason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.tar.xz
mason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.tar.zst
mason-4ab2a7c1ac67a1ad16585c069e131812e6652bf9.zip
add docs
Diffstat (limited to 'doc')
-rw-r--r--doc/nvim-lsp-installer.txt135
1 files changed, 135 insertions, 0 deletions
diff --git a/doc/nvim-lsp-installer.txt b/doc/nvim-lsp-installer.txt
new file mode 100644
index 00000000..d32915b6
--- /dev/null
+++ b/doc/nvim-lsp-installer.txt
@@ -0,0 +1,135 @@
+*nvim-lsp-installer* Semi-opinionated companion plugin for nvim-lspconfig.
+
+Minimum version of neovim: 0.5.0
+
+Author: William Boman <william@redwill.se>
+
+==============================================================================
+INTRODUCTION *nvim-lsp-installer-introduction*
+
+Semi-opinionated companion plugin for nvim-lspconfig. It comes with all
+batteries included, or at least to the extent possible.
+
+Requires:
+- neovim `nightly (>= 0.5.0)`
+- neovim/nvim-lspconfig (https://github.com/neovim/nvim-lspconfig)
+
+
+==============================================================================
+QUICK START *nvim-lsp-installer-quickstart*
+
+Install a language server via `:LspInstall`, for example: >
+
+ :LspInstall tsserver
+<
+
+Then, somewhere in your initialization script (see `:h init.lua`): >
+
+ function common_on_attach(client, bufnr)
+ -- .. set up keymaps, etc.
+ end
+
+ local installed_servers = lsp_installer.get_installed_servers()
+
+ for _, server in pairs(installed_servers) do
+ opts = {
+ on_attach = common_on_attach,
+ }
+
+ -- (optional) Customize the options passed to the server
+ -- if server.name == "tsserver" then
+ -- opts.root_dir = function() ... end
+ -- end
+
+ server:setup(opts)
+ end
+<
+
+==============================================================================
+COMMANDS *nvim-lsp-installer-commands*
+
+ *:LspInstall*
+:LspInstall {server}
+
+Installs a language server
+
+ *:LspUninstall*
+:LspUninstall {server}
+
+Uninstalls a language server.
+
+ *:LspInstallAll*
+:LspInstallAll
+
+Installs all available language servers.
+
+ *:LspUninstallAll*
+:LspUninstallAll
+
+Uninstalls all installed language servers.
+
+ *:LspPrintInstalled*
+:LspPrintInstalled
+
+Prints all installed language servers.
+
+
+==============================================================================
+Lua module: nvim-lsp-installer *lsp_installer*
+
+ *lsp_installer.get_available_servers()*
+get_available_servers()
+ Return: ~
+ (string[]) A list containing all available language servers.
+
+ *lsp_installer.get_installed_servers()*
+get_installed_servers()
+ Return: ~
+ (Installer[]) A list of installers. See |lsp_installer.Installer|.
+
+ *lsp_installer.get_uninstalled_servers()*
+get_uninstalled_servers()
+ Return: ~
+ (string[]) A list of servers that are not installed.
+
+ *lsp_installer.install()*
+install({server})
+ Installs the provided {server}. If {server} is already installed, it
+ is reinstalled.
+
+ Parameters: ~
+ {server} (string) The server to install.
+
+ *lsp_installer.uninstall()*
+uninstall({server})
+ Uninstalls the provided {server}.
+
+ Parameters: ~
+ {server} (string) The server to uninstall.
+
+==============================================================================
+Lua module: nvim-lsp-installer.installer *lsp_installer.installer*
+
+ *lsp_installer.Installer*
+class: Installer
+ This class enables installing, uninstalling, and setting up language
+ servers.
+
+ Methods: ~
+ - setup({opts})
+ Sets up the language server. This has the same function
+ signature as the setup function in nvim-lspconfig.
+
+ See |lspconfig-custom-config| for more information on
+ {opts}.
+
+ - is_installed()
+ Returns {true} is installer is installed, else returns {false}.
+
+ - install()
+ Installs this instance of an installer.
+
+ - uninstall()
+ Uninstalls this instance of an installer.
+
+ vim:tw=78:ft=help:norl: