diff --git a/.nixd.json b/.nixd.json new file mode 100644 index 0000000..4615848 --- /dev/null +++ b/.nixd.json @@ -0,0 +1,5 @@ +{ + "formatting": { + "command": "alejandra" + } +} diff --git a/modules/apps/neovim/default.nix b/modules/apps/neovim/default.nix index 957b9d9..23f3520 100644 --- a/modules/apps/neovim/default.nix +++ b/modules/apps/neovim/default.nix @@ -19,7 +19,7 @@ in { }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [fzf fd]; + environment.systemPackages = with pkgs; [fzf fd nixd]; aa.home.dataFile = { ${cfg.tmuxThemePath}.source = ./tmux_theme; @@ -150,6 +150,13 @@ in { settings = { "coc.preferences.formatOnSave" = true; "python.formatting.provider" = "black"; + "languageserver" = { + "nixd" = { + "command" = "nixd"; + "rootPatterns" = [".nixd.json"]; + "filetypes" = ["nix"]; + }; + }; }; # Copied the below from coc's README