helm/modules/editors/vim.nix

22 lines
597 B
Nix
Raw Normal View History

2020-01-12 15:17:17 -08:00
# When I'm stuck in the terminal or don't have access to Emacs, (neo)vim is my
# go-to. I am a vimmer at heart, after all.
2019-08-06 10:56:54 -07:00
2020-01-12 15:17:17 -08:00
{ config, lib, pkgs, ... }:
2019-08-06 10:56:54 -07:00
{
2020-01-12 15:17:17 -08:00
my = {
packages = with pkgs; [
2019-08-06 10:56:54 -07:00
editorconfig-core-c
neovim
];
2020-01-12 17:42:33 -08:00
2020-01-12 15:17:17 -08:00
env.EDITOR = "nvim";
env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC";
2020-01-12 17:42:33 -08:00
setup = ''
if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then
${pkgs.git}/bin/git clone https://github.com/hlissner/.vim "$XDG_CONFIG_HOME/nvim"
fi
${pkgs.gnumake}/bin/make -C "$XDG_CONFIG_HOME/nvim" update
'';
2019-08-06 10:56:54 -07:00
};
}