helm/modules/editors/vim.nix
2020-10-14 13:48:38 -04:00

29 lines
645 B
Nix

# 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.
{ config, options, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.editors.vim;
in {
options.modules.editors.vim = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
editorconfig-core-c
neovim
];
# This is for non-neovim, so it loads my nvim config
# env.VIMINIT = "let \\$MYVIMRC='\\$XDG_CONFIG_HOME/nvim/init.vim' | source \\$MYVIMRC";
environment.shellAliases = {
vim = "nvim";
v = "nvim";
};
};
}