nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.8k stars 1.78k forks source link

link vimrc and .vim/ in $HOME #4464

Open genebean opened 1 year ago

genebean commented 1 year ago

Description

It is very confusing to me the configuration file and plugins directory for vim are not linked in $HOME. It seems to me that there should be symlinks in $HOME like there are when configuring bat and zsh.

genebean commented 1 year ago

FWIW, when I am trying to wrap my head around what was actually laid down on disk it is helpful to be able to find the file in the expected location. Additionally, if home manager manages a link there then it prevents a local .vimrc from being used instead as that path is read first.

berbiche commented 1 year ago

Hi,

I believe the vim/neovim package generated and managed by Home Manager use specific flags to point the vim/neovim binary to the configuration in the nix store.

If you look at the content of the vim "binary", you'll realise that it's a wrapper that forces a specific vimrc to be used: head -n30 "$(command -v vim)" | cat -v.

The advantage of this solution is that you can test different vim configurations without overlap.

genebean commented 1 year ago

True, but the UX of not having a file, or a symlink to a file, in the place that we’ve all been trained to look for it is not good, and rather confusing.

trueNAHO commented 1 year ago

As far as I am aware, several Home Manager packages wrap the $PATH binaries to provide /nix/store paths to applications.

stale[bot] commented 9 months ago

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

* If this is resolved, please consider closing it so that the maintainers know not to focus on this. * If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

* If you are also experiencing this issue, please add details of your situation to help with the debugging process. * If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.