From d739f578a1e75b2597e211e2ba7cb3b8d6d31458 Mon Sep 17 00:00:00 2001 From: Alejandro Angulo Date: Fri, 21 Jul 2023 20:51:30 -0700 Subject: [PATCH] Added nixd --- .nixd.json | 5 +++++ modules/apps/neovim/default.nix | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .nixd.json 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