feat: configure nixd with more options

This commit is contained in:
Youwen Wu 2024-10-12 17:41:56 -07:00
parent 77ed4bd950
commit d107efcd24
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
2 changed files with 29 additions and 1 deletions

View file

@ -203,6 +203,11 @@
websocat = "${pkgs.websocat}/bin/websocat"; websocat = "${pkgs.websocat}/bin/websocat";
tinymist = "${pkgs.tinymist}/bin/tinymist"; tinymist = "${pkgs.tinymist}/bin/tinymist";
}; };
nixdExtras = {
nixpkgs = inputs.nixpkgs.outPath;
flake-path = inputs.self.outPath;
system = pkgs.system;
};
}; };
}; };
}; };

View file

@ -33,7 +33,30 @@ M.setup = function()
}, },
}) })
lspconfig.nixd.setup({}) lspconfig.nixd.setup({
nixd = {
nixpkgs = {
expr = [[import (builtins.getFlake ")]] .. nixCats("nixdExtras.nixpkgs") .. [[") { } ]],
},
-- options = {
-- nixos = {
-- expr = [[(builtins.getFlake "]]
-- .. nixCats("nixdExtras.flake-path")
-- .. [[").nixosConfigurations."]]
-- .. nixCats("nixdExtras.systemCFGname")
-- .. [[".options]],
-- },
-- -- (builtins.getFlake "<path_to_system_flake>").homeConfigurations."<name>".options
-- ["home-manager"] = {
-- expr = [[(builtins.getFlake "]]
-- .. nixCats("nixdExtras.flake-path")
-- .. [[").homeConfigurations."]]
-- .. nixCats("nixdExtras.homeCFGname")
-- .. [[".options]],
-- },
-- },
},
})
lspconfig.marksman.setup({}) lspconfig.marksman.setup({})
lspconfig.tinymist.setup({}) lspconfig.tinymist.setup({})
end end