Commit graph

951 commits

Author SHA1 Message Date
Austin Horstman
ec9d299183
tests/plugins/openscad: re-enable on darwin
Builds for me locally.
2024-08-19 20:52:09 -05:00
Austin Horstman
a1a3488779
tests/plugins/lsp: disable vscode-langservers-extracted tests (broken package)
Re-enable after https://github.com/NixOS/nixpkgs/pull/335559 is
available in nixos-unstable.
2024-08-19 20:52:09 -05:00
Austin Horstman
f7cdecbad8
tests/plugins/none-ls: disable prisma_format test (broken package) 2024-08-19 20:52:09 -05:00
Austin Horstman
a9ffb6c958
tests/plugins/lsp: disable prismals test (broken package) 2024-08-19 20:52:09 -05:00
Austin Horstman
ec9e5c071a
plugins/markview: remove unnecessary extraPlugin 2024-08-19 20:52:09 -05:00
Gaetan Lepage
460b47997f
tests/plugins/lsp: disable typst-lsp test (broken package) 2024-08-19 20:42:00 -05:00
Gaetan Lepage
fc6d40d798
tests/plugins/lsp: typst-lsp -> tinymist 2024-08-19 20:42:00 -05:00
Matt Sturgeon
123a55ed6f
tests: remove special treatment of module
Since we no longer need to extract `tests.dontRun` from an attrset, we
no longer need the "special" `module` attr.
2024-08-20 01:07:21 +01:00
Matt Sturgeon
7b2a6cd9e6
tests: tests.dontRun -> test.runNvim
Convert all test-cases to use the new `test.runNvim` module option.
2024-08-20 00:46:30 +01:00
Matt Sturgeon
f47374fd26
modules/test: init, replacing dontRun arg
Introduces the `test.runNvim` module option.

Deprecates the historic `dontRun` argument passed to the test-derivation
helpers.

Soft-deprecates the `tests.dontRun` attr used in tests currently.
2024-08-20 00:34:12 +01:00
Matt Sturgeon
69c2fa866e
tests: group tests by 10
Attempt to find a middle ground between having a single link-farm and
one test per file.

This groups up to ten tests per (roughly) 28 link-farms.
2024-08-19 01:11:10 +01:00
Matt Sturgeon
8f99c3953c
lib/util: add groupListBySize
Splits up a list into many sub-lists based on the given max-size.

e.g.
```nix
groupListBySize 2 [ 1 2 3 4 5 ]
=> [ [ 1 2 ] [ 3 4 ] [ 5 ] ]
```
2024-08-19 00:50:57 +01:00
Matt Sturgeon
693e749edb
tests/lib-test: correctly print expected/result
In some edge cases, expected and result can't be directly used in string
interpolation, so pass them through `lib.generators.toPretty` to be safe.
2024-08-19 00:38:22 +01:00
Matt Sturgeon
c52ba67856
Revert "tests: Allow to test multiple derivations in a single test derivation"
This reverts commit 71126bfebe.
2024-08-18 20:42:56 +01:00
Matt Sturgeon
9688ef723f
tests: use a link-farm again, but only per-file 2024-08-18 20:42:55 +01:00
Austin Horstman
379ae77a76
plugins/todo-comments: migrate to mkNeovimPlugin 2024-08-18 14:25:00 -05:00
Austin Horstman
00f32f0430
tests/lua-loader: builtins.match -> lib.hasInfix
Getting invalid regex expression on darwin.
2024-08-16 08:55:38 -05:00
Austin Horstman
ebd2182b44
plugins/which-key: updated spec examples and tests
Improve documentation for supported configurations
2024-08-15 15:47:25 -05:00
Enno Richter
a96aa9730a tests/plugins/utils/spectre: enable tests on Darwin 2024-08-14 23:18:51 +02:00
Austin Horstman
cb398ce4ba plugins/bufferline: migrate to mkNeovimPlugin
Also resolves https://github.com/nix-community/nixvim/issues/1890 by
automatically setting up `diagnostics.update_in_insert` for the user.
2024-08-14 11:20:17 +00:00
Matt Sturgeon
4eb2ad7db7
lib/lua: support nixpkg's "lua-inline" type
See #1935
2024-08-14 00:25:59 +01:00
Austin Horstman
d9055abe20
plugins/markview: init 2024-08-12 01:06:53 -05:00
Austin Horstman
4852f94f8c
plugins/yazi: init 2024-08-09 14:02:25 -05:00
Matt Sturgeon
c46bd820ad
plugins/firenvim: fix aliasing settings into globals
Needed to use `options.*.settings` instead of `config.*.settings`.

I was concerned that the test-case didn't pick up on this, so I added an
new test case with some basic assertions.
2024-08-09 09:28:38 +01:00
alxdb
fab51138b7 plugins/lsp/bufls: init 2024-08-08 23:29:39 +01:00
Austin Horstman
1adbf11900
plugins/which-key: migrate to mkNeovimPlugin 2024-08-08 16:17:09 -05:00
Haseeb Majid
1b135dedc4
plugins/neotest: add neotest-golang 2024-08-08 14:20:15 +01:00
psfloyd
78abafe280 plugins/lz-n: init 2024-08-08 06:18:43 +00:00
Gaetan Lepage
593f5215cb plugins/firenvim: init 2024-08-07 23:04:09 +02:00
psfloyd
c9a855fe68 plugins/nvim-snippets: init 2024-08-06 23:04:57 -03:00
Gaetan Lepage
0f7817876a plugins/luasnip: add tests 2024-08-05 05:49:37 +00:00
Matt Sturgeon
3d1224a039
tests/modules/output: remove IFD 2024-08-04 00:13:12 +01:00
Gaetan Lepage
96d0a2e390 plugins/gitblame: switch to mkNeovimPlugin 2024-08-03 16:21:55 +02:00
Matt Sturgeon
491ca5cf51
lib: provide an "extended lib" to our modules
lib/extend-lib.nix returns a nixpkg's lib extended with our own
helpers.

This is exposed as `helpers.extendedLib`, but when evaluating our
modules it should be assigned to `specialArgs.lib`.

Outside of our modules you must still access our helpers via
`config.lib.nixvim` or `config.lib.nixvim.extendedLib`.

Within helpers' sub-sections, `lib` is the extended lib.
2024-08-02 14:33:59 +01:00
Gaetan Lepage
820f8d58ea tests/otter: add treesitter to avoid warning 2024-08-01 08:13:36 +02:00
Gaetan Lepage
bae46eafd1 tests/cmp-all-sources: disable the otter source as it triggers a warning when treesitter is missing 2024-08-01 08:12:48 +02:00
Gaetan Lepage
8024b044d6 tests/plugins/efmls: disable dmd test on x86_64-darwin
https://github.com/NixOS/nixpkgs/pull/331373
2024-07-31 22:36:07 +02:00
Gaetan Lepage
5c149963c0 tests/colorschemes/cyberdream: remove invalid attribute 'style' 2024-07-31 17:05:50 +02:00
Stanislav Asunkin
9314cd46f0 modules/performance: add ability to byte compile nvim runtime directory
This commit adds `performance.byteCompileLua.nvimRuntime` toggle that,
if enabled, byte compiles all lua files in Nvim runtime directory.
2024-07-31 11:31:40 +00:00
Stanislav Asunkin
55ca9d235b modules/performance: add ability to byte compile lua plugins
This commit adds `performance.byteCompileLua.plugins` toggle that, if
enabled, byte compiles all lua files in plugins
2024-07-31 11:31:40 +00:00
Stanislav Asunkin
44849233e0 modules/performance: add ability to byte compile lua configuration files
This commit adds support for byte compiling lua configuration files.
It's enabled by default (if byte compiling is enabled at all) and can be
disabled with `performance.byteCompileLua.configs` toggle.

To implement this feature `extraFiles.<name>.finalSource` internal
read-only option is introduced. `source` option cannot be used because
it's user configurable. In order to access the values of the
`performance.byteCompileLua` options, parent config is added to
specialArgs of extraFiles submodule. Then the usages of `source` option
changed to `finalSource` in all relevant places (filesPlugin and
wrappers).

Added more helpers for various cases of byte compiling:

* `byteCompileLuaFile` byte compiles lua file
* `byteCompileLuaHook` is a setup hook that byte compiles all lua files
* `byteCompileLuaDrv` overrides derivation by adding byteCompileLuaHook
  to it

Added tests to validate that extraFiles specified by various methods are
handled correctly. Added a separate home-manager test, that is intended
to validate that extraFiles propagated to wrapper modules are correctly
byte compiled.
2024-07-31 11:31:40 +00:00
Stanislav Asunkin
17e8904992 modules/performance: add performance.byteCompileLua option
* add `performance.byteCompileLua.enable` toggle to enable or disable
  all byte compiling features
* add `performance.byteCompileLua.initLua` toggle to enable or
  disable byte compiling of init.lua
* add `writeByteCompiledLua` helper for saving byte compiled lua source
  code to the nix store
* `nixvim-print-init` utility is always pointed to uncompiled init.lua
* add tests
2024-07-31 11:31:40 +00:00
Matt Sturgeon
fc8155b5fa
tests/generated: init by checking declared tools
This moves most assertions out of generate-files and into a check
derivation. This should allow the CI to finish, even when there are
issues.

This also properly tests efmls, which was only checked partially before.

rust-analyzer is not covered because the existing assertions relate more
to edge-cases not handled by the generation script than the result it
builds.
2024-07-31 11:49:28 +01:00
Matt Sturgeon
2089eb407d
plugins/which-key: deprecate v2 registrations
These have been replaced in v3 with a new spec.

As we will soon migrate which-key to `settings` options, I've named the
new option `settings.spec` so that we do not need to "rename" it again
soon.

This commit **does not** actually add a freeform settings option.
2024-07-29 11:16:49 +01:00
Thomas Stachl
2415edc0cb
plugins/lsp/nextls: init 2024-07-29 07:47:28 +02:00
Noah Thornton
162ae6354b plugins/lsp/jdtls: add Eclipse JDT language server for Java
This adds the Eclipse JDT language server for Java.
2024-07-26 10:57:25 -07:00
Austin Horstman
91130385ed
plugins/treesitter: support unsetting keymaps 2024-07-25 15:12:52 -05:00
GGORG
30ab203d56 plugins/guess-indent: init 2024-07-25 13:45:18 +02:00
Stanislav Asunkin
6e2ec5ed02 modules/performance: add plenary filetypes directory to default pathsToLink
plenary.nvim is often pulled as a dependency of other plugins.
It has filetype definitions in `data/plenary/filetypes` directory.
Even though I don't think there are plugins using it instead of
vim.filetype, but it should be no harm to add this directory by default.
2024-07-24 16:50:50 +02:00
Stanislav Asunkin
532b0044d0 plugins/telescope: add compatibility with combinePlugins 2024-07-24 16:50:50 +02:00