1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-11-08 19:46:06 +01:00
Commit graph

105 commits

Author SHA1 Message Date
Michael Goldberger
416de18306 modules/clipboard: add pbcopy clipboard provider 2025-10-27 21:42:13 +00:00
Matt Sturgeon
2414e8e99f modules/lsp: auto-import per-server custom modules
Adding a module in the following places will import the module into that
specific server's submodule.

This allows creating server-specific options.

Added a test case to ensure all custom modules correspond to an actual
server option to avoid accidental dead code.
2025-10-10 14:11:54 +00:00
Matt Sturgeon
9f336d2d71 modules/lsp: rename server settingsconfig
See RFC: https://github.com/nix-community/nixvim/issues/3745

This effectively reverts 21688b1d2a
2025-10-09 15:31:01 +00:00
Austin Horstman
6b3bea319b dependencies: add roslyn_ls 2025-10-05 10:29:09 +00:00
Matt Sturgeon
fe059cd395 flake: add nixf-diagnose to treefmt config
Checks nixd's diagnostic lints using libnixf.
2025-10-01 00:42:40 +00:00
Matt Sturgeon
cb3653a1a8 modules/lsp: select relevant fields in keymaps table
We only use `mode`, `key`, `action`, and `options`; so explicitly
inherit those.

This means we don't serialise attrs that aren't needed at runtime,
such as `lspBufAction`.
2025-09-30 17:01:17 +00:00
Matt Sturgeon
f421af99fe modules/lsp: print keymaps table multiline
Makes `init.lua` easier to read.

Follow up to 9faa339d9e
2025-09-30 17:01:17 +00:00
Matt Sturgeon
4f858eb004 tests/modules/lsp: test lsp keymaps
Assert that the expected code is added to an autoCmd.
2025-09-30 17:01:17 +00:00
Matt Sturgeon
167ea865e5 modules/lsp: port packageFallback option from plugins.lsp
Added to `plugins.lsp` in 6a054de04d
2025-09-28 23:07:35 +00:00
Matt Sturgeon
d241216ede ci: only build "grouped" tests on x86_64-linux 2025-09-07 21:08:16 +00:00
Gaetan Lepage
16e3c175ec tests/performance: disable test
Invalid generated rockspec.

Error: /build/init.lua/lib1-0.0.1-1.rockspec: Unknown field
build_dependencies (using rockspec format 1.0)
2025-07-25 16:18:00 +00:00
Gaetan Lepage
4348aa9fad tests/modules/clipboard: do not enable wl-copy on non-linux platforms 2025-07-13 22:50:41 +00:00
sportshead
2b6f694b48 output: add extraPackagesAfter option
Allow users to add packages to the end of `PATH` in the neovim wrapper.
This is useful for LSP versions that might need to be overriden based on
the environment, e.g. `haskell-language-server` versions provided by a
project's devshell.
2025-06-08 22:14:58 +00:00
Stanislav Asunkin
65d35db5ca modules/performance: fix specifying combinePlugin.standalonePlugins as packages when byte compilation enabled
Previously, specifying plugins as packages in the
`performance.combinePlugins.standalonePlugins` option did not work when
the `performance.byteCompileLua` option was also enabled. This issue was
due to several package transformations performed by the
`byteCompileLua` which broke package comparison.

There are at least three methods to fix the issue:

- Change transformation order: combine plugins first, then byte-compile
  them.
- Compare every possible transformation when determining if plugins are
  standalone.
- Get the name of the package and use it for comparison.

The first method did not work because the current `byteCompileLuaDrv`
implementation does not support symlinks to directories. The second
method appears too fragile. This commit implements the third method, as
it requires minimal code changes and is straightforward. The downside is
that it might exclude multiple packages with the same name, although
this should be rare.
2025-06-02 18:15:32 +03:00
Stanislav Asunkin
4c23fb2738 tests/modules/performance/combine-plugins: use shared stub plugins
This commit replaces stub plugins with the shared ones from utils
module.
This also removes separate tests for checking python and lua
dependencies. This is now tested in the 'default' test thanks to
`pluginChecks` code.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
a49b270861 tests/modules/performance/byte-compile-lua: use shared stub plugins
This commit finalizes using shared utils stub plugins for
performance.byteCompileLua tests.
To re-use more code from utils module, 'pluginChecksFor', 'libChecksFor'
and 'pythonChecksFor' functions were introduced. These functions
generate a check code for the given plugins/libs names.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
75f2c1b1f1 modules/performance: ensure dependencies of lua packages also compiled
Previously only extraLuaPackages themselves were byte-compiled, not
theirs dependencies. This commit fixes that by compiling lua packages
recursively. It uses byte-compile-lua-lib.nix shared file.
Also this commit uses the shared stub lua libraries for extraLuaPackages
byte-compiling test.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
9474ce916a modules/performance: ensure all lua dependencies are byte-compiled
This commit replaces custom lua plugins in tests with shared stub
plugins from utils module.
After this change the test has started to fail. Debugging this issue
I found out that dependencies of plugins weren't processed.
This commit improves the test assertion to detect duplicated
dependencies in this case and fixes the underlying issue by also
processing dependencies.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
2c6182351f modules/performance: add ability to byte-compile plugin lua dependencies
This commit adds byte compiling of plugin lua dependencies
(specifically propagatedBuildInputs). It's enabled by
`performance.byteCompileLua.luaLib` option.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
404e56066f modules/performance: add ability to byte compile extraLuaPackages
This commit adds `performance.byteCompileLua.luaLib` options. When
enabled it byte-compiles lua packages from extraLuaPackages option.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
fac192c022 tests/modules/performance/byte-compile-lua: improve tests
* improve assert messages
* validate both byte-compiled and non-byte-compiled files are working
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
d7475dd0fa tests/modules/performance/byte-compile-lua: test with stub plugins
To reduce unexpected breakages due to changes in nixpkgs, replace the
tested plugins with specially crafted stub plugins.
2025-05-12 17:39:01 +03:00
Stanislav Asunkin
5b47c65705 tests/modules/performance/byte-compile-lua: improve bytecode detection
Previously, to determine if a file is byte-compiled, a simple binary
file detection was used, specifically checking if it contained any null
bytes. This commit updates the check to read the file header and compare
it with a known LuaJIT header.
2025-05-12 17:39:01 +03:00
Austin Horstman
5fed6b9363 plugins/claude-code: don't test on darwin
Currently failing on our CI, for some reason.
2025-05-08 10:51:26 +02:00
Matt Sturgeon
a072e3c3a7
modules/lsp: enable servers."*" by default 2025-05-01 00:36:41 +01:00
Johan Larsson
eeae362038
modules/lsp: add enable = true to wildcard config section 2025-04-30 20:55:26 +01:00
Matt Sturgeon
1df98b6636
modules/diagnostic: rename diagnostic.config -> diagnostic.settings
Follow up to #3226, in line with the decisions made in #3254.
2025-04-30 18:31:17 +01:00
Matt Sturgeon
21688b1d2a
modules/lsp/server: rename config -> settings
`config` is a loaded term within modules and options.

`settings` is the name usually used for freeform config in nixvim and
most other module configurations.
2025-04-30 17:35:46 +01:00
Gaetan Lepage
70c9b3b890 modules/lsp: init
Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
2025-04-28 18:11:39 +02:00
Stanislav Asunkin
6415ae4a97 tests/modules/performance/combine-plugins: improve assertion messages
This commit eliminates assertions boilerplate and improves assertion
message by returning the number of plugins and their names.
2025-04-28 17:26:13 +03:00
Stanislav Asunkin
f28d384ab5 modules/performance/combine-plugins: propagate lua dependencies
Plugins from luarocks (e.g. telescope-nvim) have dependencies specified
in propagatedBuildInputs. These dependencies are not added as plugins in
Nvim runtime. They are added to LUA_PATH env var for wrapped neovim.
This commit collects all propagatedBuildInputs from input plugin list
and puts them in the combined plugin.
Note that such dependencies are never combined, because they are not
plugins.
2025-04-28 17:26:13 +03:00
Stanislav Asunkin
57e19ec3ec tests/modules/performance/combine-plugins: use stub plugins for tests
During the last half of the year many dependencies of plugins used in
the tests were changed in nixpkgs. To make tests more robust use a
specially crafted stub plugins.
2025-04-28 17:26:13 +03:00
Stanislav Asunkin
9c39ea4ccb tests/modules/performance/byte-compile-lua: fix tests
telescope-nvim doesn't have explicit dependency on plenary-nvim anymore.
Use noice-nvim which have a dependency on nui-nvim instead.
2025-04-28 17:26:13 +03:00
Stanislav Asunkin
014b143f6a tests/modules/performance/combine-plugins: restore test functionality
Replace test plugins to those that reflect the intention for the test.
2025-04-28 17:26:13 +03:00
Stanislav Asunkin
faa31d994c Revert "tests/modules-performance: add nvim-cmp to extraPlugins when necessary"
This reverts commit bb5b0a2655.

This change defeats the purpose of the dependency test. Revert it.
The test should verify that dependencies are correctly pulled. If
upstream plugin doesn't have dependency anymore, then a suitable
alternative should be used, not dependencies added manually.
2025-04-28 17:26:13 +03:00
Gaetan Lepage
89c94d9ea7 plugins/telescope/media-files: use the top-level dependencies option 2025-04-27 11:28:18 +02:00
Matt Sturgeon
6c73350557
modules/diagnostic: rename diagnostics -> diagnostic.config
Currently we represent `vim.diagnostic.config()` as a top-level
`diagnostics` option. This means we have no clear namespace for
(e.g.) `vim.diagnostic.<action>` keymap functions.
2025-04-26 20:09:23 +01:00
Wyatt Avilla
d86fe3df56
modules/diagnostics: fix virtual_lines example
The setting is named `current_line`, not `only_current_line`.

See https://neovim.io/doc/user/diagnostic.html#vim.diagnostic.Opts.VirtualLines
2025-04-24 16:50:32 -07:00
Gaetan Lepage
991f3c8709 treewide: re-enable godot tests 2025-04-24 12:48:41 +02:00
Gaetan Lepage
9eb03ab777 treewide: disable godot (build failure) 2025-04-22 12:16:02 +00:00
Gaetan Lepage
7a58109958 tests/dependencies: extend the disabled logic to the "examples" test case 2025-04-21 16:08:11 +02:00
Gaetan Lepage
91073486b2 tests/dependencies: add disabled list to skip testing broken dependencies 2025-04-21 13:55:36 +02:00
Matt Sturgeon
d94956e5da
lib/deprecation: implement aliases for mkRemovedPackageOptionModule
Allows most existing configs to continue building, now with warnings
instead of assertions when the old `plugins.*.*Package` options are
used.

An assertion will still occur if there is a merge conflict, e.g:
`plugins.a.fooPackage = null` and `plugins.b.fooPackage = pkgs.foo`.
2025-04-15 22:15:18 +01:00
Matt Sturgeon
16879e3034
modules/dependencies: refactor all-examples test
Embed the original `path` as an attr in the literal expression, so that
we don't need to convert back from human readable paths in the test.
2025-04-13 18:23:06 +01:00
Gaetan Lepage
72ce6dbdf5 tests/modules/dependencies: test all package examples 2025-04-12 00:37:55 +10:00
Gaetan Lepage
cfd4b61262 modules/dependencies: init + add curl 2025-04-11 08:51:45 +10:00
Gaetan Lepage
77c5fe808a modules/lua-loader: use new 0.11 API for enabling/disabling 2025-04-01 16:03:03 +02:00
Gaetan Lepage
95573411bc modules/keymaps: add replace_keycodes keymap sub-option 2025-03-28 11:32:49 +01:00
Matt Sturgeon
00586f8f1b
modules/output: move symlinkJoin to build.package 2025-01-20 14:49:59 +00:00
Matt Sturgeon
5b068e7f8f
tests/nixpkgs: move nixpkgs module test to dedicated drv
This should be separate from `test-sources` because we want to re-use a
common instance of nixpkgs throughout those tests.

Also, moved the existing nixpkgs module test from `test-sources`.

This partially reverts commit c4ad4d0b2e.
2025-01-15 18:04:06 +00:00