diff options
| author | Crony Akatsuki <crony@cronyakatsuki.xyz> | 2025-10-20 17:49:56 +0200 |
|---|---|---|
| committer | Crony Akatsuki <crony@cronyakatsuki.xyz> | 2025-10-20 17:49:56 +0200 |
| commit | e4f3ceaa8640012a3b56841d10bc1574f65957a1 (patch) | |
| tree | 5710f76953f75507b86d0169a3ed0f17079688fc | |
| parent | 6ad065e582d778792de3beb8d69beeda93f5832c (diff) | |
| download | nvim-e4f3ceaa8640012a3b56841d10bc1574f65957a1.zip nvim-e4f3ceaa8640012a3b56841d10bc1574f65957a1.tar.gz | |
feat(lsp): setup nix.
| -rw-r--r-- | lsp/nixd.lua | 20 | ||||
| -rw-r--r-- | lua/plugins/lsp.lua | 4 |
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, }, } |
