diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/nickel_ls.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lua/lspconfig/nickel_ls.lua b/lua/lspconfig/nickel_ls.lua new file mode 100644 index 00000000..93508a66 --- /dev/null +++ b/lua/lspconfig/nickel_ls.lua @@ -0,0 +1,38 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/util' + +configs.nickel_ls = { + default_config = { + cmd = { 'nls' }, + filetypes = { 'ncl', 'nickel' }, + root_dir = util.find_git_ancestor, + }, + + docs = { + description = [[ +Nickel Language Server + +https://github.com/tweag/nickel + +`nls` can be installed with nix, or cargo, from the Nickel repository. +```sh +git clone https://github.com/tweag/nickel.git +``` + +Nix: +```sh +cd nickel +nix-env -f . -i +``` + +cargo: +```sh +cd nickel/lsp/nls +cargo install --path . +``` + +In order to have lspconfig detect Nickel filetypes (a prequisite for autostarting a server), +install the [Nickel vim plugin](https://github.com/nickel-lang/vim-nickel). + ]], + }, +} |
