diff options
| author | Matthieu Coudron <teto@users.noreply.github.com> | 2020-12-03 17:58:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-03 17:58:24 +0100 |
| commit | 81097e78a87eed46a60bde4addc5bc4770522bfd (patch) | |
| tree | 3a7618e7088350327f940614a7774555445a3ec6 /lua | |
| parent | Remove before_init workaround (diff) | |
| parent | [ZLS] change root_dir (diff) | |
| download | nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.tar nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.tar.gz nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.tar.bz2 nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.tar.lz nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.tar.xz nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.tar.zst nvim-lspconfig-81097e78a87eed46a60bde4addc5bc4770522bfd.zip | |
Merge pull request #366 from Ogromny/zls_support
Add support for Zig Language Server
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/nvim_lsp/zls.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lua/nvim_lsp/zls.lua b/lua/nvim_lsp/zls.lua new file mode 100644 index 00000000..5f5742f7 --- /dev/null +++ b/lua/nvim_lsp/zls.lua @@ -0,0 +1,22 @@ +local configs = require 'nvim_lsp/configs' +local util = require 'nvim_lsp/util' + +configs.zls = { + default_config = { + cmd = {"zls"}; + filetypes = {"zig", "zir"}; + root_dir = function(fname) + return util.root_pattern("zls.json", ".git")(fname) or util.path.dirname(fname) + end + }; + docs = { + description = [[ + https://github.com/zigtools/zls + + `Zig LSP implementation + Zig Language Server`. + ]]; + default_config = { + root_dir = [[util.root_pattern("zls.json", ".git") or current_file_dirname]]; + }; + }; +}; |
