Nixvim wrapper modules passed the host nixpkgs' fully elaborated stdenv.{host,build}Platform attrsets into Nixvim's own nixpkgs import.
When the host and Nixvim nixpkgs revisions disagreed, those platform attrsets could be re-elaborated by a different lib.systems, causing eval recursion or platform-schema errors.
Pass only { config = ...; } as the inherited platform spec instead. This keeps ABI/libc details while letting Nixvim's selected nixpkgs elaborate the platform itself.
Wrapped Nixvim configs previously passed the generated init.lua with -u. Neovim treats that startup path as an explicit user config and skips exrc processing, so project-local .nvim.lua files were not sourced even when users enabled the exrc option.
Load the generated config through a forced VIMINIT instead. This preserves the current wrapped-config precedence while allowing Neovim's normal exrc startup path to run for trusted project config files.
When impureRtp is disabled, clear XDG_CONFIG_DIRS and VIM from an early --cmd before sysinit is checked, then restore them before loading the generated config so runtime code and child processes see the original environment.
Keep the saved startup environment in a short-lived global Lua table shared between the --cmd and VIMINIT chunks, then clear it after restore.
Add a modules-output regression test that checks the wrapper args no longer include -u, verifies VIMINIT is set, confirms trusted .nvim.lua is sourced, blocks sysinit.vim, verifies XDG_CONFIG_DIRS and VIM are restored, and ensures the saved startup state is cleared.
Closes#3506
Pass the LspAttach autocmd event into the shared onAttach helper so existing configs can still read event.buf and event.data.client_id after dynamic registration support moved the user body out of the autocmd callback.
For registerCapability reruns, provide a synthetic event with the fields Neovim documents for LspAttach that nixvim can still know: buf and data.client_id.
Fixes#4335
Some LSP servers register capabilities after LspAttach, so the global onAttach body must also run from client/registerCapability for buffers already attached to that client.
Keep the initial LspAttach autocmd for servers that advertise capabilities up front, and preserve the wrapped handler's return value.
Closes#3323
nvim-jdtls 0.11+ can be initialized through native Vim LSP config, so explicit FileType start_or_attach is no longer needed.
This avoids passing an empty table into start_or_attach, which triggers the runtime assertion when cmd is unset.
Instead, map plugins.jdtls.settings to lsp.servers.jdtls.config and keep the server enabled by default.
close#4165
Expose a user-facing callSetup option for mkNeovimPlugin users while keeping plugin defaults internal. Preserve optional setup semantics, document the override, and cover the new behavior with unit and failure tests.
Expose nvim_create_user_command preview callbacks through userCommands so command previews can be configured declaratively instead of requiring raw setup Lua.
Check the existing lazyLoad option when collecting plugins that request lazy loading without an enabled provider. The previous lowercase lookup skipped the warning entirely.
Add a regression test that expects the missing-provider warning.
Replace the copied wrapper form with the final Vim regex string and
update the test fixture to match. This preserves upstream regex behavior
while still avoiding the broken Nix string escape warning.
Breaking changes recently introduced in all the nvim-treesitter rewrite.
Just make it more known that the `settings` keymaps will have no effect
in newer versions.
Default to no providers installed, opt-in vs opt-out to reduce closure
size by default. Most of these require subscriptions or familiarity with
anyways and doesn't make sense to default enable everything.
Add package mappings for newly generated lspconfig servers that are packaged in nixpkgs, and mark the remaining generated entries as unpackaged so the generated-sources check stays in sync.
Update the with-providers and without-providers cases to validate the provider globals exposed by the Neovim wrapper instead of the legacy nvim-* helper executables.
With the newer nixpkgs Neovim wrapper, plugin Lua dependencies are surfaced through neovimUtils.makeVimPackageInfo as vimPackageInfo.luaDependencies. Nixvim was still only feeding explicit extraLuaPackages into its wrapper Lua environment, so plugin-provided Lua modules stopped reaching the runtime search path after the flake.lock bump.
That showed up as real runtime failures: Telescope could not load plenary.strings and Neorg could not load lua-utils, even though explicit extraLuaPackages still worked.
Fix that by computing vimPackageInfo from config.build.plugins and appending vimPackageInfo.luaDependencies to the wrapper's extraLuaPackages. That keeps Nixvim aligned with the nixpkgs/Home Manager dependency resolution path instead of maintaining a separate recursive Lua dependency collector.
Add focused regression coverage for the two reported plugin cases:
- telescope -> plenary.strings
- neorg -> lua-utils
nixpkgs deprecated neovimUtils.makeNeovimConfig in favor of
wrapNeovimUnstable. Keep Nixvim's current generated init.lua startup
model, but stop routing wrapper construction through the deprecated
helper.
Switch modules/top-level/output.nix to call wrapNeovimUnstable
directly and preserve the existing wrappedNeovim.initRc -> generated
init.lua composition. This aligns Nixvim with the upstream wrapper API
change without changing our current bootstrap behavior yet.
Also update CONTRIBUTING to point contributors at
wrapNeovimUnstable instead of the deprecated helper.
Didn't realize `darwinOnly` didn't actually warn/fail install on linux
only. It just passes a state message to the auto-install function.
Change the state function to automatically handle the expected
condition.