diff --git a/flake.nix b/flake.nix index 421ad55..37f6b04 100644 --- a/flake.nix +++ b/flake.nix @@ -203,6 +203,11 @@ websocat = "${pkgs.websocat}/bin/websocat"; tinymist = "${pkgs.tinymist}/bin/tinymist"; }; + nixdExtras = { + nixpkgs = inputs.nixpkgs.outPath; + flake-path = inputs.self.outPath; + system = pkgs.system; + }; }; }; }; diff --git a/lua/lsp/init.lua b/lua/lsp/init.lua index 8efe794..715dcbd 100644 --- a/lua/lsp/init.lua +++ b/lua/lsp/init.lua @@ -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 "").homeConfigurations."".options + -- ["home-manager"] = { + -- expr = [[(builtins.getFlake "]] + -- .. nixCats("nixdExtras.flake-path") + -- .. [[").homeConfigurations."]] + -- .. nixCats("nixdExtras.homeCFGname") + -- .. [[".options]], + -- }, + -- }, + }, + }) lspconfig.marksman.setup({}) lspconfig.tinymist.setup({}) end