fix: move nixd config to nvim.nix

This commit is contained in:
DACHXY 2025-01-23 13:32:43 +08:00
parent 5d6f5671a6
commit d5fcc2cf5f
5 changed files with 51 additions and 36 deletions

View file

@ -40,33 +40,6 @@ return {
-- end,
-- },
nil_ls = false,
nixd = {
cmd = { "nixd" },
filetypes = { "nix" },
single_file_support = true,
root_dir = function(fname)
return util.root_pattern("flake.nix")(fname)
or vim.fs.dirname(vim.fs.find(".git", { path = fname, upward = true })[1])
end,
settings = {
nixd = {
nixpkgs = {
expr = "import <nixpkgs> { }",
},
formatting = {
command = { "nixfmt" },
},
-- options = {
-- nixos = {
-- expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.k-on.options',
-- },
-- home_manager = {
-- expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."ruixi@k-on".options',
-- },
-- },
},
},
},
nginx_language_server = {
cmd = { "nginx-language-server" },
filetypes = { "nginx" },