aboutsummaryrefslogtreecommitdiffstats
path: root/README_preamble.md
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-15 17:26:22 -0800
committerGitHub <noreply@github.com>2019-11-15 17:26:22 -0800
commit5686a90890105e6271307e86b472f729af1cc4f8 (patch)
tree7d691ac0e7ea2feb58c5862dd52a1c8bfbef6fb4 /README_preamble.md
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar
nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.gz
nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.bz2
nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.lz
nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.xz
nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.tar.zst
nvim-lspconfig-5686a90890105e6271307e86b472f729af1cc4f8.zip
Redo installation. (#17)
* Redo installation. Servers which want to be auto installed should specify skeleton[name].install() and it will be automatically added to the list of installable servers. - Add :LspInstall and :LspInstallInfo - Auto generate docs for servers with .install() available. - Add util.npm_installer - Refactor utf8 capabilities common config into a single function - Add contribution notes. - Also expose util.base_install_dir for other installers potentially - Fix tsserver's arguments and add javascript filetypes
Diffstat (limited to 'README_preamble.md')
-rw-r--r--README_preamble.md36
1 files changed, 29 insertions, 7 deletions
diff --git a/README_preamble.md b/README_preamble.md
index f19a73ba..8c994acb 100644
--- a/README_preamble.md
+++ b/README_preamble.md
@@ -31,6 +31,7 @@ them are good references.
## Progress
Implemented:
+- [bashls](https://github.com/neovim/nvim-lsp#bashls)
- [clangd](https://github.com/neovim/nvim-lsp#clangd)
- [elmls](https://github.com/neovim/nvim-lsp#elmls)
- [gopls](https://github.com/neovim/nvim-lsp#gopls) (has some errors)
@@ -50,7 +51,33 @@ In progress:
`Plug 'neovim/nvim-lsp'`
-## Use
+## Usage
+
+Servers configurations can be set up with a "setup function." These are
+functions to set up servers more easily with some server specific defaults and
+more server specific things like commands or different diagnostics.
+
+The "setup functions" are `call nvim_lsp#setup({name}, {config})` from vim and
+`nvim_lsp[name].setup(config)` from Lua.
+
+Servers may define extra functions on the `nvim_lsp.SERVER` table, e.g.
+`nvim_lsp.texlab.buf_build({bufnr})`.
+
+### Auto Installation
+
+Many servers can be automatically installed with the `:LspInstall`
+command. Detailed installation info can be found
+with the `:LspInstallInfo` command, which optionally accepts a specific server name.
+
+For example:
+```vim
+LspInstall elmls
+silent LspInstall elmls " useful if you want to autoinstall in init.vim
+LspInstallInfo
+LspInstallInfo elmls
+```
+
+### Example
From vim:
```vim
@@ -82,12 +109,7 @@ nvim_lsp.gopls.setup {
require 'nvim_lsp'.texlab.buf_build(0)
```
-These are functions to set up servers more easily with some server specific
-defaults and more server specific things like commands or different
-diagnostics.
-
-Servers may define extra functions on the `nvim_lsp.SERVER` table, e.g.
-`nvim_lsp.texlab.buf_build({bufnr})`.
+### Setup function details
The main setup signature will be: