aboutsummaryrefslogtreecommitdiffstats
path: root/lua/nvim_lsp/zls.lua
diff options
context:
space:
mode:
authorAndrej Benz <hello@benz.dev>2020-12-11 09:26:34 +0100
committerGitHub <noreply@github.com>2020-12-11 09:26:34 +0100
commitb7612bafe4e06972a15075e1dbc5e7c3f926ea91 (patch)
tree48d95e3c9e2c5dccf478f5fe89f624829f273094 /lua/nvim_lsp/zls.lua
parentchanged filepath (diff)
parentMerge pull request #438 from HiPhish/kotlin (diff)
downloadnvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.tar
nvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.tar.gz
nvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.tar.bz2
nvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.tar.lz
nvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.tar.xz
nvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.tar.zst
nvim-lspconfig-b7612bafe4e06972a15075e1dbc5e7c3f926ea91.zip
Merge branch 'master' into master
Diffstat (limited to 'lua/nvim_lsp/zls.lua')
-rw-r--r--lua/nvim_lsp/zls.lua22
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]];
+ };
+ };
+};