Last active
January 25, 2023 18:16
-
-
Save antislava/d676e39cdc96f286e26f973ac21fb98f to your computer and use it in GitHub Desktop.
Adding custom vim plugin with Nix Home Manager example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, ... }: | |
rec { | |
nixpkgs = { | |
overlays = [ | |
(self: super: | |
let | |
vim-better-whitespace = super.vimUtils.buildVimPlugin { | |
name = "vim-better-whitespace"; | |
src = pkgs.fetchFromGitHub { | |
owner = "ntpeters"; | |
repo = "vim-better-whitespace"; | |
rev = "984c8da518799a6bfb8214e1acdcfd10f5f1eed7"; | |
sha256 = "10l01a8xaivz6n01x6hzfx7gd0igd0wcf9ril0sllqzbq7yx2bbk"; | |
}; | |
}; | |
in { | |
vimPlugins = | |
super.vimPlugins // { inherit vim-better-whitespace; }; | |
} | |
) | |
]; | |
}; | |
programs.home-manager = { | |
enable = true; | |
path = https://github.com/rycee/home-manager/archive/master.tar.gz; | |
}; | |
programs.vim = { | |
enable = true; | |
extraConfig = builtins.readFile vim/vimrc.vim; | |
settings = { number = true; }; | |
plugins = [ # Defined here: pkgs/misc/vim-plugins/default.nix | |
# Standard plugins | |
"nerdtree" | |
"vim-airline" | |
# New plugins | |
"vim-better-whitespace" | |
]; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment