-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
neovim: expose sideloadInitLua option to control the generation of init.lua
#9028
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
Merged
khaneliman
merged 22 commits into
nix-community:master
from
veselyn:move-luaRcContent-to-wrapper-as-args
Apr 17, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
669baa7
neovim: remove wrapper's luaRcContent from init.lua and load via args
veselyn 50b090d
revert: "neovim: remove wrapper's luaRcContent from init.lua and load…
veselyn f970836
neovim: expose wrapGeneratedConfigs option to control how generated c…
veselyn 001e4fb
neovim: use false as option variant to disable wrapping
veselyn c97e7c8
Merge remote-tracking branch 'upstream/master' into move-luaRcContent…
veselyn 56fadc9
neovim: replace wrapGeneratedConfigs with sideloadInitLua option
veselyn 01fe9de
neovim: make wrapper-args test pass
veselyn 93a8afb
neovim: make no-init-vim test strictly about init.vim
veselyn cf275d0
neovim: test enabled sideloadInitLua option
veselyn dc06681
neovim: make existing extra-lua-* tests pass
veselyn e60886d
neovim: format module
veselyn f82ea7b
Merge remote-tracking branch 'upstream/master' into move-luaRcContent…
veselyn c353b71
neovim: attempt to fix test on CI by using realPkgs.neovim-unwrapped
veselyn e79600c
neovim: update test snapshots after merging upstream
veselyn 5775343
neovim: format tests
veselyn 70c96ef
Merge remote-tracking branch 'upstream/master' into move-luaRcContent…
veselyn 246ca77
neovim: improve sideloadInitLua option description
veselyn 11579ca
neovim: revert tests
veselyn 74d746d
neovim: assert init.lua doesn't exist when sideloadInitLua is true
veselyn 2e50c31
neovim: update init.lua snapshots with disabled ruby provider
veselyn dbf2358
news: add entry about programs.neovim and sideloaded init.lua
veselyn b56ca35
neovim: reference correct full path to init.lua
veselyn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { config, ... }: | ||
| { | ||
| time = "2026-04-17T15:00:13+00:00"; | ||
| condition = config.programs.neovim.enable; | ||
| message = '' | ||
| The module `programs.neovim` now writes to | ||
| {file}`$XDG_CONFIG_HOME/nvim/init.lua` by default. | ||
|
|
||
| If you want to manage {file}`$XDG_CONFIG_HOME/nvim/init.lua` yourself, you | ||
| can set {option}`programs.neovim.sideloadInitLua` to `true` to load the | ||
| content of {option}`programs.neovim.initLua` through neovim wrapper | ||
| arguments instead. | ||
| ''; | ||
| } | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,18 @@ | ||
| { lib, ... }: | ||
| { | ||
| imports = [ ./stubs.nix ]; | ||
|
|
||
| programs.neovim.enable = true; | ||
|
|
||
| nmt.script = '' | ||
| nvimFolder="home-files/.config/nvim" | ||
| assertPathNotExists "$nvimFolder/init.lua" | ||
| initLua="home-files/.config/nvim/init.lua" | ||
| initLuaNormalized="$(normalizeStorePaths "$initLua")" | ||
|
|
||
| assertFileContent "$initLuaNormalized" ${builtins.toFile "init.lua-expected" ( | ||
| lib.trim '' | ||
| vim.g.loaded_node_provider=0;vim.g.loaded_perl_provider=0;vim.g.ruby_host_prog='/nix/store/00000000000000000000000000000000-neovim-ruby-env/bin/neovim-ruby-host';vim.g.python3_host_prog='/nix/store/00000000000000000000000000000000-nvim-host-python3/bin/nvim-python3' | ||
| '' | ||
| )} | ||
| ''; | ||
| } |
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.