399 Commits
Author SHA1 Message Date
Max KoonandMatt Sturgeon 94fa51d8b7 modules/lsp: updated inlayHints option description 2026-08-17 11:45:24 +00:00
Max KoonandMatt Sturgeon 73a1c2ef73 modules/lsp: added codelens option 2026-08-17 11:45:24 +00:00
Gaetan Lepage 902dd3995b modules/lsp: update server packages 2026-08-10 15:46:33 +00:00
Austin Horstman 1b436e6a65 modules/lsp/servers: document common configurations
Add primary-source-backed examples for common servers whose configuration shape is easy to get wrong.
2026-07-29 20:19:54 +00:00
Austin Horstman 4966920244 modules/lsp/servers: document tinymist configuration
Add Tinymist-specific guidance and verify rendered option metadata while preserving generic server fallbacks.
2026-07-29 20:19:54 +00:00
Austin Horstman 2633ab9f52 modules/lsp/servers: support documentation overrides
Allow generated server options to accept per-server descriptions and submodule arguments without changing existing package data.
2026-07-29 20:19:54 +00:00
Matt Sturgeon ebd0f063f8 modules/doc: disable man-docs on darwin
We cannot build docs on Darwin because pandoc is currently built without
lua support: https://github.com/NixOS/nixpkgs/issues/540900
2026-07-12 13:18:22 +00:00
belamuandMatt Sturgeon fee8f33284 modules/opts: docs on difference between opts, global opts and local opts
These differences are clear for users that are well-versed in neovim
configuration but need a while to figure out for neovim newcomers.

Therefore I hope that they can help.
2026-07-06 14:40:11 +00:00
Matt Sturgeon 78acb50d9a modules/nixpkgs: import libForPkgs correctly 2026-07-01 03:15:00 +00:00
Matt Sturgeon cc3b773a7a modules/nixpkgs: use libForPkgs for elaborate
`lib.systems.elaborate` is sensitive to Nixpkgs revision, so import a
`lib` instance from the Nixpkgs revision we're constructing.
2026-07-01 00:13:16 +00:00
Austin Horstman c6a99bb41f modules/nixpkgs: warn about platform specs
Document that fully elaborated platform attrsets from another Nixpkgs instance can be unsafe when Nixvim imports a different nixpkgs.source.
2026-06-29 04:20:49 +00:00
Matt Sturgeon f60bf47332 modules/nixvim-info: flatten and simplify
Instead of recursively merging a nested tree, construct a flat map of
"option-path" → {info}.

This should be more efficient to eval, and simpler to introspect.
2026-06-22 20:39:04 +00:00
Austin Horstman 157cbcb47b modules/lsp/packages: map newly packaged servers
Move servers from unpackaged list to direct nixpkgs packages where
binary names are now available so auto-install can resolve them.
2026-06-16 19:23:42 +00:00
Austin Horstman 1d91fc6f88 modules/lsp/packages: add dexter packaged 2026-06-15 19:17:02 +00:00
Matt SturgeonandAustin Horstman 55ae671d68 modules/lsp/packages: update unpackaged LSPs
No effort was made to check if any of these _are_ packaged.
2026-06-15 19:17:02 +00:00
Matt Sturgeon 586286af54 modules/output: prevent duplicate vimPlugin assertion locations
It's possible the same plugin-name is defined multiple times in the same
file.
2026-06-15 04:08:14 +00:00
Matt Sturgeon 1fb6dccabf modules/output: make vimPlugin assertions lazier
Delay the `definitionsWithLocations` pipeline until evaluating the
assertion's `message`. The `assertion` condition itself can be a cheaper
`not any isVimPluginPackage`.
2026-06-15 04:08:14 +00:00
Matt Sturgeon e3c908fdf6 modules/output: add source locations to vimPlugin assertions
Include the definition locations of offending vim-plugins in the
`extraPackages` & `extraPackagesAfter` assertion messages.

This makes it easier to track down the plugin declarations,
especially when values originate from multiple modules.
2026-06-13 22:04:18 +00:00
Austin Horstman 19a4e5efa1 modules/output: reject vim plugins in extraPackages
Prevent Vim plugin derivations from being silently treated as PATH packages and point users to extraPlugins instead.
2026-06-13 17:52:26 +00:00
Matt SturgeonandAustin Horstman f2029d9a26 lib/keymaps: remove lua submodule option
Co-authored-by: Austin Horstman <khaneliman12@gmail.com>
2026-06-12 18:04:20 +00:00
Matt Sturgeon 90ccd43c71 modules/test: add "all" expectation predicates 2026-06-12 18:04:20 +00:00
Matt Sturgeon 4d73571e54 modules/nixpkgs: use version-info.toml for source assertion
It may be cheaper to evaluate `(version-info.toml).nixpkgs_rev` instead
of `(nixpkgs.nix).rev` in some scenarios.

I've seen some reports of `builtins.fetchTree` _eagerly_ fetching the
FOD even without forcing `outPath`.
2026-06-09 19:46:00 +00:00
Matt Sturgeon 5ff549fdaf modules/opts: drop rename aliases 2026-06-08 02:02:43 +00:00
Matt Sturgeon 6a2a8308fb modules/autocmd: remove autoCmd.description deprecation 2026-06-08 02:02:28 +00:00
Matt Sturgeon 6b494042f8 modules/readonly-renames: drop 2026-06-07 23:59:20 +00:00
Corbin WunderlichandMatt Sturgeon 98acb923e5 lsp/servers/packages: add package for prismals
A package for prisma-language-server was added in nixpkgs with
NixOS/nixpkgs#444038
2026-06-07 16:25:25 +00:00
Diogo Correiaandtraxys 2109e94081 lsp/servers/packages: add package for phpantom_lsp
The phpantom-lsp package is available in nixpkgs
since https://github.com/NixOS/nixpkgs/pull/504192
2026-05-30 14:48:46 +00:00
Matt Sturgeon 909aa0a782 wrappers: pass in existing lib.nixvim
Extracting `specialArgs.lib.nixvim` from the final `programs.nixvim`
configuration is neat, but recursive. In non-lazy scenarios, it can end
up infinitely recursive.

We could extract `specialArgs.lib.nixvim` from another nixvim
configuration, such as one of the earlier `extendModules` evaluations,
however it is better to avoid evaluating multiple configurations
unnecessarily.

Instead, revert back to getting `lib.nixvim` from the same configuration
we get `extendModules` from.
2026-05-24 23:09:56 +00:00
Adam DinwoodieandMatt Sturgeon cb0107f6e1 modules/nixpkgs: pass lib to config function
Nixpkgs config, for defining things like which licenses are
permitted, can either be an attrset or a function that is passed a
`pkgs` argument.  Evaluating that `pkgs` argument requires computing the
Nixpkgs fixpoint, which requires checking whether the derivations used
in the Nixpkgs bootstrap have valid licenses.  This works provided
nothing tries to use Nixpkgs functions to validate or merge anything
included in the configuration.

f5deefd4631e (config: add and document {allow,block}listedLicenses,
2025-08-31), in #437723, added type checking and merging to the lists of
permitted/forbidden licenses.  That resulted in a recursion loop if a
list of licenses included, say, `pkgs.lib.licenses.bsd0`.

To allow licenses to be specified from Nixpkgs' library, pass `lib` as
well as `pkgs` to any config function.  Computing `lib` doesn't require
working out the full Nixpkgs fixpoint.  The change in #437723 will still
break things for some people, but it at least provides a sensible route
to getting the config working again.

Fixes https://github.com/NixOS/nixpkgs/issues/456994.

Cherry-picks https://github.com/NixOS/nixpkgs/commit/8e94561d62272983c93f6c635919874f8d19d8f9
2026-05-24 05:41:42 +00:00
‮rekcäH nitraM‮andMatt Sturgeon a3dffa03ad modules/nixpkgs: add setting nixpkgs.config.allowUnfreePackages = ["list" "of "packages"]
Inspired by https://github.com/NixOS/nixpkgs/issues/197325 this adds a
new option `nixpkgs.allowUnfreePackages`, which merges additively and can
thus be defined in multiple modules close to where the unfree package is
installed.

I would have liked to name this option
`nixpkgs.config.allowUnfreePackages`, to define it closer to where the
`allowUnfree` and `allowUnfreePredicate` are defined, but I didn't see how
this could be achieved. I would welcome some guidance on how to do this.

Cherry-picks https://github.com/NixOS/nixpkgs/commit/a3c9221d642da4c0b22b9c9576bd2af8dcbb8263
2026-05-24 05:41:42 +00:00
Wolfgang WaltherandMatt Sturgeon ff3cd5fa14 modules/nixpkgs: top-level pkgs now returns __splicedPackages
Cherry-picks https://github.com/NixOS/nixpkgs/commit/f2640ee208003ca7102cbda97740b07871fa7635
2026-05-24 05:41:42 +00:00
Matt Sturgeon 978a84388e Revert "modules/nixpkgs: don't assign elaborated platforms"
This reverts commit f99264c1fb.

Cherry-picks https://github.com/NixOS/nixpkgs/commit/7c251e2b5fda2b42c3ff2983fdcc9eac82f2ced6
2026-05-24 05:41:42 +00:00
Austin Horstman 06a19e0783 modules/output: assert pure rtp needs wrapper 2026-05-24 04:27:26 +00:00
Austin Horstman d82f383100 modules/output: load wrapped config via VIMINIT
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
2026-05-24 04:27:26 +00:00
Matt Sturgeon d5bd4d4e41 modules/doc: disable manpage docs when config.flake is undefined
We currently access all `docs` packages via flake outputs.
2026-05-24 03:05:36 +00:00
Matt Sturgeon e1ad5c4e92 wrappers: encapsulate access to lib.nixvim and lib-overlay
- Pass only `evalNixvim` into standalone.nix.
- Access Nixvim lib via the submodule configuration in _shared.nix.
2026-05-24 03:05:36 +00:00
Matt Sturgeon f58f056882 modules/nixpgks: warn when nixpkgs.source default is incorrect
Currently, `nixpkgs.source` can be affected by flake input following.
Nixvim is sensitive to the pinned Nixpkgs revision and users often
follow inputs without thinking too much about it, so warn when this is
detected.
2026-05-24 03:05:36 +00:00
Matt Sturgeon 886bd8fd62 modules/nixpkgs: nixpkgs.source fallback when flake undefined 2026-05-24 03:05:36 +00:00
Austin HorstmanandMatt Sturgeon 7f6f92a3c9 modules/lsp/onAttach: preserve event scope
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
2026-05-21 21:32:05 +00:00
Austin Horstman a5a46c9447 dependencies: add cspell package 2026-05-21 21:00:09 +00:00
Austin Horstman aa6fe35cff dependencies: add just package 2026-05-21 20:59:54 +00:00
Austin Horstman fb7de4e724 dependencies: add sioyek package deps 2026-05-21 20:59:41 +00:00
Austin HorstmanandGaétan Lepage 5f2f6cecca dependencies: add vectorcode package 2026-05-20 22:55:13 +00:00
Austin HorstmanandGaétan Lepage 31613daf87 dependencies: add codex package 2026-05-20 22:33:52 +00:00
Austin Horstman c7e82d37c2 modules/lsp/onAttach: handle dynamic registrations
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
2026-05-20 17:06:06 +00:00
Gaetan Lepage 06cace835d modules/lsp: update packages 2026-05-16 04:38:30 +00:00
sportsheadandMatt Sturgeon d885c9b79b plugins/jj-nvim: init 2026-05-14 18:48:54 +00:00
Austin HorstmanandGaétan Lepage a4ab30928b modules/editorconfig: remove concatLines usage
Related https://github.com/NixOS/nixpkgs/pull/506077 and
https://github.com/NixOS/nixpkgs/pull/514350
2026-05-04 11:46:50 +00:00
Austin Horstman a67d9cd6ff modules/top-level/output: add autowrapRuntimeDeps
Support user's overriding the wrapper behavior for wrapping runtime deps
from nixpkgs. Default to enabled, matching the wrapper.
2026-04-26 20:45:45 +00:00
Juha KestiandAustin Horstman d404af65e9 modules/top-level/files: set pname on nvim-config wrapper plugin
The build.extraFiles wrapper plugin is built via
`pkgs.runCommandLocal "nvim-config"`, which sets only the derivation
`name`, not `pname`. Recent nixpkgs (as of 2026-04) extended
`pkgs.vim-pack-dir` to map `plugin.pname` over the start/opt plugin
list when checking for an nvim-treesitter / nvim-treesitter-legacy
conflict, so building any standalone nixvim package against current
nixpkgs unstable fails with `attribute 'pname' missing`.

Setting `pname = "nvim-config"` on this derivation explicitly
restores the pre-2026-04 behavior without touching nixpkgs.

Repro:
  nix build --impure --expr '
    let
      nixpkgs = builtins.getFlake "github:NixOS/nixpkgs/nixos-unstable";
      nixvim = builtins.getFlake "github:nix-community/nixvim";
      system = "x86_64-linux";
    in
      (nixvim.legacyPackages.${system}.makeNixvim { })
  '
2026-04-26 15:52:56 +00:00