neovim: dont wrap the configuration, write it in ~/.config/nvim to not stray away from the typical neovim workflow#5964
Closed
teto wants to merge 2 commits intonix-community:masterfrom
Closed
Conversation
8988fb3 to
4557434
Compare
6 tasks
6 tasks
7 tasks
|
Would it be possible to make this change opt-in? |
Collaborator
Author
why ? no. The current way makes no sense IMO, i.e., it just installs "one" neovim, regardless of anything user-specific. It surprises all users and is the source of a lot of confusion. Note that in the past week, the nixpkgs documentation for the neovim wrapper has improved significantly and creating your custom neovim should be a lot easier. One could even use |
be96eb0 to
583f3b2
Compare
See previous attempt at nix-community#3717 and its revert at nix-community#3817 - link the packpath in expected folder so that even unwrapped neovim can pick home-manager's plugins. Right now the path to plugins (`:h rtp` / `:h packpath`) is set in the neovim wrapper. Not only is this unusual but if you want to run an unwrapped neovim (a neovim GUI or when you hack on neovim for instance), the app doesn't find plugins installed by home-manager. With this change, neovim can discover HM-installed plugins by itself and hopefully we can make neovim configuration less magical and surprising to newcomers.
make test TEST=neovim-plugin-config - would previously use `-u` which we precisely want to avoid relying on because of side-effects. Likewise, `-es` skips some initialization phase (see `:h startup`). - Instead of several stdout redirections, write to a file directly. - also logs more via -V3$out/log.txt to help debug
583f3b2 to
accbbb4
Compare
13 tasks
|
Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting. If you are the original author of the PR
If you are not the original author of the PR
|
teto
added a commit
to teto/nixpkgs
that referenced
this pull request
Dec 14, 2025
In home-manager we dont want to add "--set packpatk/rtp" otherwise packages are loaded twice see: nix-community/home-manager#5964 Since the wrapper args are easily added by the user (by using `finalAttrs.packpathDirs`), I propose we dont set them when wrapRc is set as well.
teto
added a commit
to teto/nixpkgs
that referenced
this pull request
Dec 17, 2025
In home-manager we dont want to add "--set packpatk/rtp" otherwise packages are loaded twice see: nix-community/home-manager#5964 Since the wrapper args are easily added by the user (by using `finalAttrs.packpathDirs`), I propose we dont set them when wrapRc is set as well.
9 tasks
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
2nd attempt at:
HM wraps the neovim executable with its config, which is a pain because nvim
behaves a bit different with
-u, also it prevents neovim GUIs to load yourconfig unless you wrap them too (painful).
Requires NixOS/nixpkgs#348740
Checklist
Change is backwards compatible.
Code formatted with
./format.Code tested through
nix-shell --pure tests -A run.allornix develop --ignore-environment .#allusing Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC