[RFC][WIP] vim module: support pkg and vimrc specification#19502
[RFC][WIP] vim module: support pkg and vimrc specification#19502primeos wants to merge 1 commit intoNixOS:masterfrom
Conversation
|
👎 |
|
Hey @jagajaga thanks for your feedback but could you please elaborate a bit more on this? Edit: To be clear I'm a bit confused, especially since I just figured out that you've been the one who merged my previous PR #19438... I personally think that adding these options is a good idea but of course I could be wrong. If you didn't respond with the "thumb-down" reaction by accident I would be interested what you think is wrong with this so that I could hopefully improve it or understand why this change is a bad idea - Thanks 😄 From the new "Reviewing contributions" chapter (NixOS Manual):
|
Add an option for selecting which vim derivation to use, one to define a system-wide vimrc (/etc/vim/vimrc) and one to define a system-wide gvimrc (/etc/vim/gvimrc).
|
Sorry I am angry because I'm learning colemak :) We had lots of discussions about such configs for such kind of programs. And as a result it war decided that such configs are for services mostly. Vim is not a service. |
|
Hey @jagajaga I guess you don't happen to still remember a link to that discussion, right? If you do I'd be interested as I consider having a short discussion about that (at least in the IRC channel). And I guess there could've probably been some exceptions for programs like vim (imho having a customized system-wide vimrc could make sense). And looking at the other programs we still have "/etc/atoprc", "/etc/profile", "etc/bashrc", "etc/fish/config.fish", "/etc/screenrc", ... (not all of them are directly accessible via an option tho) - even "/etc/nanorc"! PS: Good luck with learning colemak then :) |
Motivation for this change
Provide a way to select which vim derivation to use as the system-wide default editor (atm the package must contain
./bin/vim- don't know if something like neovim (./bin/nvim), etc. should be supported as well - but since other options might also be incompatibleprograms.neovim, etc. would probably make more sense).Add an option to define a default configuration which is written to
/etc/vim/vimrc(doesn't make much sense atm since pkgs.vim doesn't parse this file (not yet, anyway)). Howevervim_configurabledoes source/etc/vim/vimrc(and/etc/vimrc) so that works :)Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)Add an option for selecting which vim package to use and another one to
define a system wide vimrc (/etc/vim/vimrc - currently ignored).
TODO (WIP):
vimrcforpkgs.vimthat sources/etc/vim/vimrc? (we're currently using The ArchLinux global vimrc)/etc/vim/vimrcor/etc/vimrc? (I personally prefer/etc/vim/vimrcsince it keeps/etccleaner if e.g.gvimrcis used as well)cc @lovek323