Nix hm #1
2 changed files with 25 additions and 0 deletions
15
nvim/lua/lsp/servers/nil.lua
Normal file
15
nvim/lua/lsp/servers/nil.lua
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
return {
|
||||||
|
cmd = { "nil" },
|
||||||
|
filetypes = { "nix" },
|
||||||
|
root_markers = {
|
||||||
|
"flake.nix",
|
||||||
|
".git"
|
||||||
|
},
|
||||||
|
settings = {
|
||||||
|
["nil"] = {
|
||||||
|
formatting = {
|
||||||
|
command = { "nixfmt" },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
10
nvim/lua/lsp/servers/zls.lua
Normal file
10
nvim/lua/lsp/servers/zls.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
return {
|
||||||
|
cmd = { "zls" },
|
||||||
|
on_new_config = function(new_config, new_root_dir)
|
||||||
|
if vim.fn.filereadable(vim.fs.joinpath(new_root_dir, "zls.json")) ~= 0 then
|
||||||
|
new_config.cmd = { "zls", "--config-path", "zls.json" }
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
filetypes = { "zig", "zir" },
|
||||||
|
root_markers = {"zls.json", "build.zig", ".git"},
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue