Commit graph

937 commits

Author SHA1 Message Date
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
Stanislav Asunkin
5c75cfac13 plugins/telescope/fzy-native: add compatibility with combinePlugins 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
61caa52fc5 plugins/telescope/fzf-native: add compatibility with combinePlugins 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
ce93f1724f plugins/treesitter: add workaround for performance.combinePlugins 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
0c32f5bda5 modules/performance: don't combine filesPlugin into plugin pack
It's expected that user may want to override some runtime files in its
own config directory. Do not combine it into plugin pack to avoid
collisions.
2024-07-24 16:50:50 +02:00
Stanislav Asunkin
e65c9590d0 modules/performance: add combinePlugins.standalonePlugins option 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
d6bebcefa3 modules/performance: handle plugin configs when combining plugins 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
27201addd7 modules/performance: handle optional plugins when combining plugins 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
f900dcd6aa modules/performance: handle python3 dependencies when combining plugins 2024-07-24 16:50:50 +02:00
Stanislav Asunkin
fdb3950c59 modules/performance: add an option to combine plugins to a single plugin pack 2024-07-24 16:50:50 +02:00
Nathan Felber
6387299364
plugins/cmake-tools: init 2024-07-24 10:15:51 +01:00
Antonín Říha
ab67ee7e8b plugins/lsp/openscad-lsp: init
Signed-off-by: Antonín Říha <antonin.riha@protonmail.com>
2024-07-24 00:04:05 +02:00
Gaetan Lepage
3b6d403f39 plugins/better-escape: switch to mkNeovimPlugin + update 2024-07-23 23:21:01 +02:00
Stanislav Asunkin
299d0406bb modules/output: refactor config generation
The motivation for this change was to avoid generating empty
config sections like

    vim.cmd([[

    ]])

To make a config generation cleaner several helper functions introduced:

* `hasContent` have been moved to helpers
* `concatNonEmptyLines` joins strings (which has content) separated with
  newlines
* `wrapVimscriptForLua` wraps a lua string for using in Vimscript, but
  only if the string has content, otherwise empty string is returned
* `wrapLuaForVimscript` wraps Vimscript for using in lua, but only if
  the string has content, otherwise empty string is returned

Added tests:

* testing that all possible config sections are present in the final
  generated config
* testing that the config files generated by empty `files` definitions
  don't have any content in it
2024-07-22 23:18:53 +02:00
Matt Sturgeon
6dc0bda459
lib/to-lua: handle derivations as path strings
Fixes #1888
2024-07-22 13:24:16 +01:00