diff options
Diffstat (limited to 'lua/lspconfig/zls.lua')
| -rw-r--r-- | lua/lspconfig/zls.lua | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lua/lspconfig/zls.lua b/lua/lspconfig/zls.lua new file mode 100644 index 00000000..66668050 --- /dev/null +++ b/lua/lspconfig/zls.lua @@ -0,0 +1,22 @@ +local configs = require 'lspconfig/configs' +local util = require 'lspconfig/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]]; + }; + }; +}; |
