-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vim remove share/runtime/NAME prefix from the installed folder #136429
Conversation
7a0e642
to
481a8dd
Compare
it seems to work just fine with the "native vim plugin manager". I suspect it may break other handlers like pathogen/vam/vim-plug but do we need those ? I wonder what's their added value in nix. |
481a8dd
to
450f238
Compare
@MarcWeber the pathogen test passes, but there are no tests for vam. I've no idea if this PR breaks it or not. Could you confirm it doesn't break anything ? Eventually add a test ? |
nixpkgs creates a hierarchy of 3 folders share/runtime/<PKG_NAME> for no reason ? makes debugging harder as well as paths longer when patching so this removes this nested folders.
450f238
to
56f823d
Compare
The files are installed via build-vim-plugin. Doing that again is a waste of resources, worse it can create errors
I've added a vim-plug test + checked vam I think it should be ok.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
will look into it, it looked fine with home-manager. Is this your config https://github.com/figsoda/dotfiles/blob/main/lib/nvim/default.nix ? |
I'm sorry I didn't realize my config was not on the same version of nixpkgs, everything is fine now |
This PR broke my neovim setup with:
Config: https://github.com/rvolosatovs/infrastructure/blob/7f301f9375a1df69ec41cbe7c1ad0c11feff9fbc/nixpkgs/neovim/config.nix#L5-L354 I'm quite sure we should not be silently breaking setups of everyone depending on supported features. |
There has been changes to both lua and vim infra. Could you share what nixpkgs you are using. Also why are you using vim-plug, your config doesnt seem to take advantage of it ? |
The original reason was #56338 (comment)
With neovim built off 8b13843 (parent of this PR merge commit) everything worked fine and off ed77db8 I could reproduce the error. |
This PR unfortunately broke my current setup too. I don't use the Nixpkgs Vim wrappers for plugin management and mostly use plain vim-plug to manage plugins outside of Nix. However, for a few plugins that rely on native binaries, I install them through Nix into the user profile and refer to them by path. This approach now seems infeasible because plugins now collide with each other when installed into a single profile.
|
@rvolosatovs the vimrc generated by vim-plug looks fine here, for instance the binary from
can load 'base16-tomorrow-night' unlike the error you see (try @midchildan you haven't shared your nix expression ? You could generate an init.vim via home-manager (using packpath and all) and in the customrc source another manual file. For instance my neovim config (a frankenstein config) installs plugins via nix/Plug and packer.nvim. See https://github.com/teto/home/blob/2715a6196e167dfa6854dc3257c62073f7aa26ea/hm/profiles/neovim.nix#L453 |
The Nix expressions I use for (Neo)Vim aren't particularly interesting. I only use it to install Neovim and a handful of plugins with Home Manager's
I'm mostly concerned about this PR effectively disabling the ability to install vim plugins in the same way as other Nix packages, which I believe to be a quite disruptive change. I'm aware that users can work around the new behavior, and if this change becomes permanent, I'd create wrapper packages for each vim plugins I use to simulate previous behavior. However, if the cost of retaining the previous behavior in Nixpkgs is three additional subdirectories in the resulting packages, I'd prefer the previous behavior be restored. |
Hmm, weird! In any case, I switched to native plugin manager yesterday (rvolosatovs/nixelium@24d6bca) and so far have not encountered any issues |
Good for you. I will add the test nevertheless and if there is another vim-plug user that has a similar problem, hopefully we can reproduce the issue and I can fix this. @midchildan nix-env is full of issues and there are dozens of better ways to do this, you can write the path to the nix store directly, you can wrap neovim to see the different binaries, you can generate a packdir via nix and reference it, sometimes configure the plugins to specify a binary, I dont think your usecase should influence the simplification I've made here. This is part of an attempt to automatically hande dependencies of lua plugins in nix. |
I wasn't referring to nix-env specifically, though. In my case, it's Home Manager. But that aside, I guess the next ideal solution for me personally would be to create a packdir and link to it in nixpkgs/pkgs/misc/vim-plugins/vim-utils.nix Lines 235 to 242 in 7eca001
|
Hello! I think this PR broke help tags for vim plugins. From my investigation, it seems that the Another (really minor) break from my config, is that now every vim plugin now needs to have the Thanks for the work as always! |
thanks for the report. Will try to fix & add a test for this later today. |
@midchildan btw I will make vimUtils.packDir public in my next branch (if you don't want to go through the whole PR thing) @minijackson this patch should restore the generation of tag
|
@teto Thanks. Looking forward to it! |
After NixOS/nixpkgs#136429, vim plugins are no longer installed in ~/.nix-profile/share/vim-plugins. So instead create a packdir and place it in ~/.vim/pack. This change also introduces a new Home Manager option, 'dotfiles.vim.plugins.opt' and 'dotfiles.vim.plugins.start' to manage vim plugins.
#138349 should fix the issue for the vim-plug side. Looks like vim-plug doesn't like the |
* https://channels.nixos.org/ doesn't have recent enough version yet, so I picked Hydra evaluation https://hydra.nixos.org/eval/1709299 and downloaded nixexprs archive from github. * They removed /share/vim-plugins prefix from vimPlugins, so I can't install separate plugins anymore (they collide with each other). For now I'm just using previous nixexprs for vimPlugins. See: NixOS/nixpkgs#136429 Will need to do it differently.
ok i quite enjoyed being able to |
Motivation for this change
When looking into plugin issues, there is a hierarchy of 3 folders
share/runtime/<PKG_NAME>
for no reason ? just makes debugging harder as well as paths longer when patching.This passes nixpkgs-review.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)