aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lsp/nixd.lua20
-rw-r--r--lua/plugins/lsp.lua4
2 files changed, 24 insertions, 0 deletions
diff --git a/lsp/nixd.lua b/lsp/nixd.lua
new file mode 100644
index 0000000..6e2d589
--- /dev/null
+++ b/lsp/nixd.lua
@@ -0,0 +1,20 @@
+return {
+ settings = {
+ nixd = {
+ nixpkgs = {
+ expr = "import (builtins.getFlake(toString ./.)).inputs.nixpkgs { }",
+ },
+ formatting = {
+ command = {"alejandra"},
+ },
+ options = {
+ nixos = {
+ expr = "let flake = builtins.getFlake(toString ./.); in flake.nixosConfigurations.skadi.options",
+ },
+ home_manager = {
+ expr = "let flake = builtins.getFlake(toString ./.); in flake.homeConfigurations.skadi.options",
+ },
+ },
+ },
+ },
+}
diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua
index 081a78c..aa96f78 100644
--- a/lua/plugins/lsp.lua
+++ b/lua/plugins/lsp.lua
@@ -1,5 +1,9 @@
return {
{
"neovim/nvim-lspconfig",
+ config = function()
+
+ vim.lsp.enable("nixd")
+ end,
},
}