Skip to content

Commit 79794e2

Browse files
BirdeeHubMattSturgeon
authored andcommitted
Update doc/languages-frameworks/neovim.section.md
Co-authored-by: Marc Jakobi <[email protected]> Update pkgs/applications/editors/neovim/wrapper.nix Co-authored-by: Matt Sturgeon <[email protected]> Update doc/languages-frameworks/neovim.section.md Co-authored-by: Matt Sturgeon <[email protected]> Update doc/release-notes/rl-2511.section.md Co-authored-by: Matt Sturgeon <[email protected]> Update doc/languages-frameworks/neovim.section.md Co-authored-by: Matt Sturgeon <[email protected]> Update doc/release-notes/rl-2511.section.md Co-authored-by: Matt Sturgeon <[email protected]> Update doc/release-notes/rl-2511.section.md Co-authored-by: Matt Sturgeon <[email protected]>
1 parent f81e8e6 commit 79794e2

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

doc/languages-frameworks/neovim.section.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ For instance, `sqlite-lua` needs `g:sqlite_clib_path` to be set to work. Nixpkgs
5959
- `neovimRcContent`: Extra vimL code sourced by the generated `init.lua`.
6060
- `wrapperArgs`: Extra arguments forwarded to the `makeWrapper` call.
6161
- `wrapRc`: Nix, not being able to write in your `$HOME`, loads the
62-
generated Neovim configuration via the `$VIMINIT` environment variable, i.e. : `export VIMINIT='lua dofile("/nix/store/...generatedInit.lua")'`. This has side effects like preventing Neovim from reading your config in `$XDG_CONFIG_HOME` (see bullet 7 of [`:help startup`](https://neovim.io/doc/user/starting.html#_initialization) in Neovim). Disable it if you want to generate your own wrapper. You can still reuse while reusing the logic of the nixpkgs wrapper and access the generated config via `neovim.passthru.initRc`.
62+
generated Neovim configuration via the `$VIMINIT` environment variable, i.e. : `export VIMINIT='lua dofile("/nix/store/…-init.lua")'`. This has side effects like preventing Neovim from sourcing your `init.lua` in `$XDG_CONFIG_HOME/nvim` (see bullet 7 of [`:help startup`](https://neovim.io/doc/user/starting.html#startup) in Neovim). Disable it if you want to generate your own wrapper. You can still reuse the generated vimscript init code via `neovim.passthru.initRc`.
6363
- `plugins`: A list of plugins to add to the wrapper.
6464

6565
```

doc/release-notes/rl-2511.section.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@
3333

3434
### Additions and Improvements {#sec-nixpkgs-release-25.11-lib-additions-improvements}
3535

36-
- Create the first release note entry in this section!
36+
- `neovim`: Added support for the `vim.o.exrc` option, the `VIMINIT` environment variable, and sourcing of `sysinit.vim`.
37+
38+
See the neovim help page [`:help startup`](https://neovim.io/doc/user/starting.html#startup) for more information, as well as [the nixpkgs neovim wrapper documentation](#neovim-custom-configuration).

pkgs/applications/editors/neovim/wrapper.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ let
4848
viAlias ? false,
4949

5050
# additional argument not generated by makeNeovimConfig
51-
# it will append "-u <customRc>" to the wrapped arguments
51+
# it sets the VIMINIT environment variable to "lua dofile('${customRc}')"
5252
# set to false if you want to control where to save the generated config
5353
# (e.g., in ~/.config/init.vim or project/.nvimrc)
5454
wrapRc ? true,
@@ -195,7 +195,7 @@ let
195195
++ lib.optionals finalAttrs.wrapRc [
196196
"--set-default"
197197
"VIMINIT"
198-
"lua dofile([[${writeText "init.lua" rcContent}]])"
198+
"lua dofile('${writeText "init.lua" rcContent}')"
199199
]
200200
++ finalAttrs.generatedWrapperArgs;
201201

0 commit comments

Comments
 (0)