Commit graph

937 commits

Author SHA1 Message Date
Stanislav Asunkin
34aa3e00e7 modules/filetype: ensure that the module does not set empty settings
When setting any filetype suboption to null (or anything else guarded by
mkIf) it's value becomes:

    { extension = null; filename = null; pattern = null; }

Account for that case in mkIf condition so that the option would not
produce empty filetype definition.
2024-07-22 11:33:52 +03:00
Stanislav Asunkin
06261fc472 modules/lsp/servers/vls: do not add filetype extension if not enabled 2024-07-21 20:17:03 +02:00
Stanislav Asunkin
8eb5763bbb modules/lua-loader: make enable option nullable
This avoids having the option always "defined".

This also avoids luaLoader configuration in extra files by default.
Earlier `vim.loader.disable()` was always added to configs produced
by `files` option, effectively disabling luaLoader even if it was
explicitly enabled in a top-level configuration.
2024-07-21 17:11:50 +03:00
traxys
7908729711 dev: Make the tests command able to select which test to launch
The `tests` command can either launch all tests (without any arguments),
a specific test with `-t/--test` or choose a test with `-i/--interactive`
2024-07-21 15:17:17 +02:00
traxys
b1576362a7 tests: Remove the test link farm
Fixes #1878
2024-07-21 15:17:17 +02:00
Stanislav Asunkin
c9a6912be5 modules/files: fix creating configs of vim type 2024-07-19 14:45:34 +03:00
traxys
daa94bd6c2 tests: Disable coq-nvim defaults on x86_64 darwin 2024-07-19 11:11:17 +02:00
traxys
50d865275d tests: Reduce the number of calls to mkTestDerivationFromNixvimModule 2024-07-19 11:11:17 +02:00
traxys
71126bfebe tests: Allow to test multiple derivations in a single test derivation 2024-07-19 11:11:17 +02:00
Gaetan Lepage
94bea519de tests/efmls-configs: update test excludes 2024-07-14 00:06:08 +02:00
Gaetan Lepage
0d95fc6888 plugins/telescope/extensions/undo: deprecate option diff_context_lines 2024-07-14 00:05:32 +02:00
Matt Sturgeon
d8f3113e90
plugins/none-ls: refactor using mkSourcePlugin
Introduce `_mk-source-plugin.nix`, which returns a module handling a
specific none-ls source plugin.

This wasn't possible previously due to IFD conflicting with evaluating
module imports.

Adjusted the test to use the `options` provided via module args, and
cleaned up some stuff allowing "unpackaged" sources to not be listed
again in the test file.
2024-07-13 20:11:09 +01:00
Austin Horstman
1385953299
plugins/treesitter: fix parser_install_dir default
The plugin's default is not compatible with nix, because it ends up in
the read-only /nix/store.

Set our default to the one used in their upcoming "1.0" version.
2024-07-12 10:48:21 -05:00
Austin Horstman
dc1559f25e
plugins/rustaceanvim: fix deprecation in test 2024-07-12 09:59:09 -05:00
traxys
123c102a13 plugin/rustaceanvim: Handle rust-analyzer settings rename 2024-07-10 22:44:58 +02:00
Matt Sturgeon
34c3c026b4
tests: add check for nixpkgs maintainers
The test fails if a nixvim maintainer is also a nixpkgs maintainer.
2024-07-10 09:18:18 +01:00
Matt Sturgeon
a5e9dbdef1
plugins/bufdelete: init 2024-07-09 14:15:38 +01:00
seth
0f76a8cdfc plugins/glow: init 2024-07-09 06:06:29 +00:00
Austin Horstman
435ef287ab
plugins/treesitter: switch to mkNeovimPlugin 2024-07-08 09:09:48 -05:00
Matt Sturgeon
c0ea106b4b
colorschemes/base16: add settings + refactor
Added support for the plugin's "advanced" config settings.

Removed the enum restriction and prefix concatenation, allowing anything
to be passed through, including raw lua: fixes #1675

The theme list is now much shorter and is included directly in the option
description.

Some general cleanup, in particular to `extraConfig` and `customColorschemeType`.
2024-07-08 10:21:27 +01:00
Gaetan Lepage
451beb4eca plugins/leap: allow __empty for safeLabels option 2024-07-08 09:54:47 +02:00
Matt Sturgeon
f11f991e09
flake/checks: test extraFiles are in the build 2024-07-07 16:43:06 +01:00
Matt Sturgeon
086873bed9
modules: refactor extraFiles
Moved `extraFiles` from `modules/output.nix` into its own file `modules/files.nix`.

Users should now assign text to a `text` attribute, however they could
also assign a file path to a `source` attribute instead.

The old method of directly assigning a string still works, and is
coerced to the new type along with a deprecation warning.
2024-07-07 16:42:47 +01:00
Stanislav Asunkin
6674dea840 modules/output: fix extraLuaPackages 2024-07-06 20:44:43 +00:00
Matt Sturgeon
b59fa976d0
plugins/nvim-osc52: hide warnings in tests 2024-07-05 16:06:01 +01:00
m1mir
87c7757a5b
plugins/coverage: Added keymap for the loadLcov command. 2024-07-05 13:36:29 +01:00
Gaetan Lepage
92e9f5466d plugins/chatgpt: init 2024-07-04 21:00:56 +00:00
Matt Sturgeon
9b25eaaa6f
lib/to-lua: fix removing empties nested in lists
- Add options for removing empty/null list entries (default false)
- Fix recursion into attrs that are themselves list entries

Fixes #1804
2024-07-03 16:44:30 +01:00
Gaetan Lepage
6252a41fc6 plugins/preview: init 2024-07-02 15:38:28 +02:00
Gaetan Lepage
18bea9bad6 plugins/markdown-preview: move source in dedicated markdown sub-folder 2024-07-02 15:33:00 +02:00
Matt Sturgeon
55fee7051f
standalone: rename nixvimExtend to extend
This is our scope, so there's no need to be explicit.

This also follows the precedent set by `lib.extend`, although that takes
an overlay function.
2024-07-01 15:54:29 +01:00
Gaetan Lepage
3bfe71f1ae plugins/yanky: export 'utils' and 'mapping' for more readible settings 2024-07-01 14:22:27 +00:00
Gaetan Lepage
b3c520d13e plugins/yanky: switch to mkNeovimPlugin 2024-07-01 14:22:27 +00:00
Gaetan Lepage
f6e32ac3cf plugins/neoclip: init 2024-07-01 15:37:23 +02:00
Matt Sturgeon
aaab869d4f plugins/flash: switch to mkNeovimPlugin 2024-07-01 12:18:56 +00:00
Matt Sturgeon
3a8d4fee35
plugins/cmp: refactor source->plugin association
Introduce the internal option `cmpSourcePlugins` where plugins can
register their nvim-cmp source name association.
2024-06-30 18:22:59 +01:00
Matt Sturgeon
78275321f8
tests/test-derivation: don't invoke test modules
`def.module or lib.removeAttrs def [ "tests" ]` is actually equivalent to
`(def.module or lib.removeAttrs) def [ "tests" ]`.

This meant whenever `def` had a `module` attribute, it was invoked as
`def.module def [ "tests" ]`!
2024-06-30 18:22:58 +01:00
Matt Sturgeon
10f64e6c96
tests/test-derivation: allow tests to be modules
Use `mkTestDerivationFromNixvimModule` instead of `mkTestDerivation`,
allowing "proper" modules to be used instead of plain attr configs.

This is useful for more complex tests that wish to use `config` or
`options` arguments, e.g:

```nix
{config, options, ...}: {
  /* some cool test */
}
```

To allow `tests.dontRun` to be defined on such a test, the module is
allowed to be nested as `module`, e.g:

```nix
{
  tests.dontRun = true;
  module = {config, options, ...}: {
    /* a disabled test */
  };
}
```

Also ended up doing some general cleanup, removing an unused function,
etc.
2024-06-29 22:02:44 +01:00
Gaetan Lepage
d564b52999 tests/plugins/none-ls: re-enable rubyfmt test for linux 2024-06-29 12:36:07 +02:00
Matt Sturgeon
7dcdd6e989
plugins/lsp-lines: switch to mkNeovimPlugin
Remove custom options in favor of using `diagnostics` directly.
2024-06-28 23:14:01 +01:00
Matt Sturgeon
aff12581d8
lib/lua: refactor toLuaObject, now configurable
Heavily based on nixpkgs lib.generators.toPretty
2024-06-28 22:44:43 +01:00
PerchunPak
cd479ec0ef plugins/otter: init 2024-06-28 22:39:51 +01:00
Gaetan Lepage
1b3bda78b4 plugins/zk: switch to mkNeovimPlugin 2024-06-28 20:11:48 +02:00
Jamis Hartley
ab9bca4a1e colorschems/everforest: init 2024-06-28 01:09:46 +01:00
Matt Sturgeon
ca8ac5f8e4
plugins/none-ls: switch to mkNeovimPlugin 2024-06-27 11:35:41 +01:00
Matt Sturgeon
53a9599cc4
lib/lua: pad table , with a space
Makes toLuaObject's output a little more readable.
2024-06-26 12:35:47 +01:00
Matt Sturgeon
00ce71f51a
lib/lua: only quote table keys when needed 2024-06-26 12:31:05 +01:00
Matt Sturgeon
01cf43dbaa
lib/lua: add isKeyword and isIdentifier
Allow testing whether a string is a valid lua identifier or a reserved
keyword.
2024-06-26 11:40:52 +01:00
Gaetan Lepage
b64ee08d6b plugins/codesnap: init 2024-06-26 07:28:11 +02:00
Gaetan Lepage
18ecd740e9 plugins.gitsigns: remove deprecated options
https://github.com/lewis6991/gitsigns.nvim/issues/453
2024-06-24 08:32:52 +02:00