diff --git a/nix/progs/nvim/default.nix b/nix/progs/nvim/default.nix index 63625d2..1f31b05 100644 --- a/nix/progs/nvim/default.nix +++ b/nix/progs/nvim/default.nix @@ -26,12 +26,16 @@ let nerdtree-git-plugin # shows files git status on the NerdTree neoformat # formating code nvim-treesitter # treesitter configurations and abstraction layer + fzf-vim # fuzzy finder ]; # Additional language servers that we should install mannually - lspPackages = with pkgs; [ - rnix-lsp + lspPackages = with pkgs; [ rnix-lsp ]; + # Additional tools + toolsPackages = with pkgs; [ + fzf ripgrep # required for `fzf-vim` plugin ]; + additionalPackages = lspPackages ++ toolsPackages; baseConfig = builtins.readFile ./config.vim; pluginsConfig = builtins.readFile ./plugins.vim; @@ -49,7 +53,7 @@ in enable = mkOption { type = types.bool; default = false; - description = "Add and configure exa, a modern replacement for ls"; + description = "Add and configure neovim"; }; default = mkOption { @@ -60,7 +64,7 @@ in }; config = mkIf cfg.enable { - home.packages = lspPackages; + home.packages = additionalPackages; programs.neovim = { enable = true; @@ -74,14 +78,9 @@ in "nvim/coc-settings.json".text = cocSettings; }; - # home.sessionVariables = mkIf cfg.default { - # EDITOR = bin; - # }; - - # programs.zsh.shellAliases = mkIf config.shell.zsh.enable { - # vi = bin; - # vim = bin; - # }; + home.sessionVariables = mkIf cfg.default { + EDITOR = "${pkgs.neovim}/bin/nvim"; + }; }; }