nix/nvim: add fzf plugin

This commit is contained in:
Dmitriy Pleshevskiy 2022-06-23 23:04:59 +03:00
parent 6d9de5c1fa
commit 2ef63823b2
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -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";
};
};
}