helm/modules/editors/vim.nix

23 lines
587 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";
# My vim config is too stateful to manage with nix
init = ''
2020-01-12 17:42:33 -08:00
if [ ! -d "$XDG_CONFIG_HOME/nvim" ]; then
${pkgs.git}/bin/git clone https://github.com/hlissner/.vim "$XDG_CONFIG_HOME/nvim"
fi
'';
2019-08-06 10:56:54 -07:00
};
}