summaryrefslogtreecommitdiff
path: root/nvim/init.lua
diff options
context:
space:
mode:
authorkkard2 <[email protected]>2024-08-10 19:15:30 +0200
committerkkard2 <[email protected]>2024-08-10 19:15:30 +0200
commit726c18d50aadef1c3c40b1e1becd15798067bafb (patch)
tree2cdb1c1138328558bb9ff11d64f2b23120b60699 /nvim/init.lua
parentb47afb757c4d63b95fe699514c5cfcfc34ec5900 (diff)
mason deez
Diffstat (limited to 'nvim/init.lua')
-rw-r--r--nvim/init.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/nvim/init.lua b/nvim/init.lua
index 4d19ef7..dabc86b 100644
--- a/nvim/init.lua
+++ b/nvim/init.lua
@@ -229,6 +229,25 @@ vim.api.nvim_set_hl(0, "HarpoonActive", { background = "Gray", foreground = "Whi
vim.api.nvim_set_hl(0, "HarpoonNumberInactive", { background = "Black", foreground = "White" })
vim.api.nvim_set_hl(0, "HarpoonInactive", { background = "Black", foreground = "White" })
+
+vim.api.nvim_create_autocmd('FileType', {
+ -- This handler will fire when the buffer's 'filetype' is "python"
+ pattern = 'zig',
+ callback = function(ev)
+ vim.lsp.start({
+ name = 'zls',
+ cmd = {'zls'},
+
+ -- Set the "root directory" to the parent directory of the file in the
+ -- current buffer (`ev.buf`) that contains either a "setup.py" or a
+ -- "pyproject.toml" file. Files that share a root directory will reuse
+ -- the connection to the same LSP server.
+ root_dir = vim.fs.root(ev.buf, {'build.zig', '.gitignore'}),
+ })
+ end,
+})
+
+
-- lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then