aboutsummaryrefslogtreecommitdiff
path: root/modules/neovim/nvim/lua/config/lsp/zls.lua
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-04-03 22:30:43 -0400
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-04-03 22:30:43 -0400
commitf1150b73ebaae94c83d15e9def14acf0bbe704d5 (patch)
tree110c54d047eefa8b48128bac6df816e1b21e07de /modules/neovim/nvim/lua/config/lsp/zls.lua
parent21b8b191ec8d7e6d08f53d2be60f60fd4e65efff (diff)
downloadhome-f1150b73ebaae94c83d15e9def14acf0bbe704d5.tar.gz
update
Diffstat (limited to 'modules/neovim/nvim/lua/config/lsp/zls.lua')
-rw-r--r--modules/neovim/nvim/lua/config/lsp/zls.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/neovim/nvim/lua/config/lsp/zls.lua b/modules/neovim/nvim/lua/config/lsp/zls.lua
new file mode 100644
index 0000000..d2013a4
--- /dev/null
+++ b/modules/neovim/nvim/lua/config/lsp/zls.lua
@@ -0,0 +1,11 @@
+return {
+ cmd = { "zls" },
+ filetypes = { "zig", "zir" },
+ on_new_config = function(new, old)
+ if vim.fn.filereadable(vim.fs.joinpath(new_root_dir, "zls.json")) ~= 0 then
+ new.cmd = { "zls", "--config-path", "zls.json" }
+ end
+ end,
+ root_markers = { "zls.json", "build.zig", ".git" },
+ single_file_support = true,
+}