neovim: ship RC file as ~/.config/nvim/

this allows easier editing at runtime
This commit is contained in:
2025-08-18 21:22:21 +00:00
parent 4addf857b7
commit 34c2d4f66f
2 changed files with 16 additions and 5 deletions

View File

@@ -67,12 +67,12 @@ in
viAlias = true;
vimAlias = true;
plugins = plugin-packages;
customRC = ''
${builtins.readFile ./vimrc}
# customRC = ''
# ${builtins.readFile ./vimrc}
""""" PLUGIN CONFIG
${plugin-configs}
'';
# """"" PLUGIN CONFIG
# ${plugin-configs}
# '';
};
neovim-unwrapped' = with pkgs; neovim-unwrapped.overrideAttrs (upstream: {
# fix cross compilation:
@@ -122,9 +122,17 @@ in
# due to <https://github.com/NixOS/nixpkgs/pull/344541>
rubyEnv = null;
withRuby = false;
wrapRc = false; #< don't force VIMINIT env var
postBuild = lib.replaceStrings [ "if ! $out/bin/nvim-wrapper " ] [ "if false " ] base.postBuild;
});
fs.".config/nvim/init.vim".symlink.text = ''
${builtins.readFile ./vimrc}
""""" PLUGIN CONFIG
${plugin-configs}
'';
# private because there could be sensitive things in the swap
persist.byStore.private = [ ".cache/vim-swap" ];
env.EDITOR = "vim";

View File

@@ -1,3 +1,6 @@
" ENV VARS
" VIMINIT=/path/to/init.vim to use a different vimrc
" let the terminal handle mouse events, that way i get OS-level ctrl+shift+c/etc
" this used to be default, until <https://github.com/neovim/neovim/pull/19290>
set mouse=