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