diff --git a/common/home/neovim/langs/nix.nix b/common/home/neovim/langs/nix.nix index b94c58d..b5a98c9 100644 --- a/common/home/neovim/langs/nix.nix +++ b/common/home/neovim/langs/nix.nix @@ -26,13 +26,6 @@ in home.packages = with pkgs; [ alejandra - - # FIXME: set nixd to use alejandra - (writeShellApplication { - name = "nixpkgs-fmt"; - runtimeInputs = [alejandra]; - text = "alejandra \"$@\""; - }) ]; xdg.dataFile."${flakeDir}/.nixd.json".text = builtins.toJSON { @@ -55,10 +48,15 @@ in lua */ '' - local lsp = require('lspconfig'); - - lsp.nixd.setup({}); - lsp.nixd.setup(require('coq').lsp_ensure_capabilities({})); + require('lspconfig').nixd.setup(require('coq').lsp_ensure_capabilities({ + settings = { + nixd = { + formatting = { + command = { "alejandra" }, + }, + }, + }, + })); ''; }; };