diff options
| author | Avi Dessauer <avi.the.coder@gmail.com> | 2021-11-05 01:44:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-04 22:44:58 -0700 |
| commit | 055179d39e7b5c59e347d224dd02ac598eb489f9 (patch) | |
| tree | bbb0579a650d25e5d738fa067ed63fdd15a01a6f /lua | |
| parent | docs: update CONFIG.md (diff) | |
| download | nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.tar nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.tar.gz nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.tar.bz2 nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.tar.lz nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.tar.xz nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.tar.zst nvim-lspconfig-055179d39e7b5c59e347d224dd02ac598eb489f9.zip | |
feat: add Nickel Language Server (#1370)
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). + ]], + }, +} |
