Commit graph

1805 commits

Author SHA1 Message Date
Matt Sturgeon
38d43a740f
modules/files: don't include modules in the docs
This means we no longer need to spoof the module in the docs implementation.

Instead, we supply the (optional) special arg `isDocs` to `evalModules`.
2024-07-05 17:38:46 +01:00
Matt Sturgeon
f5ba05ec82
modules/files: move submodule to its own file 2024-07-05 17:21:56 +01:00
Matt Sturgeon
2deb61f6a5
modules/top-level: move out of wrappers/modules 2024-07-05 17:20:28 +01:00
Matt Sturgeon
b59fa976d0
plugins/nvim-osc52: hide warnings in tests 2024-07-05 16:06:01 +01:00
traxys
99f272d8c7 plugigns/efmls-configs: Use the generated source files 2024-07-05 16:57:03 +02:00
traxys
01d9178788 generated: Generate the efmls-configs tools 2024-07-05 16:57:03 +02:00
traxys
c1231826b9 dev: Add a script to generate efmls-configs tools 2024-07-05 16:57:03 +02:00
m1mir
87c7757a5b
plugins/coverage: Added keymap for the loadLcov command. 2024-07-05 13:36:29 +01:00
Matt Sturgeon
4730563e01 github/mergify: set an explicit "update" account
Fixes #1793
2024-07-05 11:54:58 +00:00
traxys
668894b6d3 github: Re-generate the files on updates 2024-07-05 13:34:44 +02:00
traxys
954876bef7 plugins/lsp/rust-analyzer: Use the newly generated options 2024-07-05 13:34:44 +02:00
traxys
a4cf6c6ffe generated: Generate the rust-analyzer options 2024-07-05 13:34:44 +02:00
traxys
8b6b2e5253 dev: Add a script to generate rust-analyzer options 2024-07-05 13:34:44 +02: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
Matt Sturgeon
87f50db84d
modules/nixpkgs: don't set args.lib
`lib.evalModules` always includes `lib`, `config`, `options`, &
(configured) `specialArgs` in the (final) `specialArgs`[1].

Therefore, setting `_module.args.lib` has no effect.

[1]: 329d232802/lib/modules.nix (L233)
2024-07-02 20:26:55 +01:00
Matt Sturgeon
11df0d6c9e
modules: use assertions module from nixpkgs
It is essentially identical to our `warnings` module.
2024-07-02 19:58:30 +01:00
Matt Sturgeon
d2afb176ff
modules: refactor module bootstrapping
Let's simplify things by defining all modules in `./plugins`, `./modules`
and `./wrappers/modules`.

Instead of currying `pkgs` into a bootstrapping module, we can require
`defaultPkgs` be provided as a special arg.

This refactor allows us to completely remove `flake-modules/modules.nix`!
2024-07-02 19:58:30 +01:00
Matt Sturgeon
3d96960348 wrappers: simplify modules 2024-07-02 14:15:51 +00: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
github-actions[bot]
1760f7912e flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9' (2024-06-30)
  → 'github:hercules-ci/flake-parts/4e3583423212f9303aa1a6337f8dffb415920e4f' (2024-07-01)
• Updated input 'home-manager':
    'github:nix-community/home-manager/36317d4d38887f7629876b0e43c8d9593c5cc48d' (2024-06-29)
  → 'github:nix-community/home-manager/59ce796b2563e19821361abbe2067c3bb4143a7d' (2024-07-01)
• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/50581970f37f06a4719001735828519925ef8310' (2024-06-23)
  → 'github:lnl7/nix-darwin/ec12b88104d6c117871fad55e931addac4626756' (2024-07-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2741b4b489b55df32afac57bc4bfd220e8bf617e' (2024-06-29)
  → 'github:NixOS/nixpkgs/00d80d13810dbfea8ab4ed1009b09100cca86ba8' (2024-07-01)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd' (2024-06-30)
  → 'github:numtide/treefmt-nix/bdb6355009562d8f9313d9460c0d3860f525bc6c' (2024-07-02)
2024-07-02 15:32:48 +02:00
purepani
079c2c479b plugins/lsp/pylsp: Add python option to generate obtain the pylsp from.
Currently, pkgs.python3Packges is used by default and is unable to be
changed. This stops consumers from using different/newer python
versions.
2024-07-01 19:58:20 +01:00
Matt Sturgeon
100ae4027d
plugins/nvim-osc52: mark as obsolete
Upstream has declared the plugin obsolete because OSC52 support was
added to Neovim 0.10.

See https://neovim.io/doc/user/provider.html#clipboard-osc52
2024-07-01 17:24:08 +01: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
e054fe2bc0 contributing: add note clarifying freeform settings 2024-07-01 13:14:45 +00:00
Matt Sturgeon
71b8d0b327 readme: use markdown warning 2024-07-01 13:14:45 +00:00
Matt Sturgeon
aaab869d4f plugins/flash: switch to mkNeovimPlugin 2024-07-01 12:18:56 +00:00
Gaetan Lepage
7cc1685eaf plugins/neotest: add assertion to ensure that neotest is enabled if an adapter is 2024-07-01 13:59:20 +02:00
github-actions[bot]
55a45b6713 flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
  → 'github:hercules-ci/flake-parts/c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9' (2024-06-30)
• Updated input 'home-manager':
    'github:nix-community/home-manager/7e68e55d2e16d3a1e92a679430728c35a30fd24e' (2024-06-28)
  → 'github:nix-community/home-manager/36317d4d38887f7629876b0e43c8d9593c5cc48d' (2024-06-29)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/b2852eb9365c6de48ffb0dc2c9562591f652242a' (2024-06-27)
  → 'github:NixOS/nixpkgs/2741b4b489b55df32afac57bc4bfd220e8bf617e' (2024-06-29)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/065a23edceff48f948816b795ea8cc6c0dee7cdf' (2024-06-24)
  → 'github:numtide/treefmt-nix/8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd' (2024-06-30)
2024-07-01 09:18:41 +00:00
Matt Sturgeon
1391a64cf6
plugins/otter: switch to nvim-cmp association
Removes the addCmpSources option.
2024-06-30 18:22:59 +01:00
Matt Sturgeon
17f4aa5556
plugins/cmp: refactor sources list & mkCmpSourcePlugin
List mkCmpSourcePlugin args directly in `sources/default.nix`,
similar to LSP's language-servers list.
2024-06-30 18:22:59 +01: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
bd422db9ba
plugins/cmp: fix secondary settings descriptions 2024-06-30 18:22:58 +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
714aa7bb18
flake/devshell: add test-lib command + improve checks 2024-06-30 17:53:35 +01:00
Sandro Jäckel
662a0e1bdb wrappers: use system from stdenv.hostPlatform
`pgs.system` is a flaky alias and it is more reliable to directly use
`pkgs.stdenv.hostPlatform.system`
2024-06-30 09:54:24 +02:00
Matt Sturgeon
c062b976ef
flake/legacyPackages: simplify makeNixvim, making it more powerful
Rather than nesting it as `config`, pass `makeNixvim`'s argument through
directly as a module.

This not only simplifies the implementation, but allows users to use
`makeNixvim` for any scenario where `makeNixvimWithModule` would normally
be required.
2024-06-29 22:15:45 +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
Matt Sturgeon
049bbc168f
github/mergify: rename yaml -> yml (#1775)
It seems mergify only checks for `.yml`, not `.yaml` files.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2024-06-29 13:01:15 +00:00
Gaetan Lepage
d564b52999 tests/plugins/none-ls: re-enable rubyfmt test for linux 2024-06-29 12:36:07 +02:00
github-actions[bot]
f938dfd9bf flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/1a4f12ae0bda877ec4099b429cf439aad897d7e9' (2024-06-26)
  → 'github:nix-community/home-manager/7e68e55d2e16d3a1e92a679430728c35a30fd24e' (2024-06-28)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60' (2024-06-24)
  → 'github:NixOS/nixpkgs/b2852eb9365c6de48ffb0dc2c9562591f652242a' (2024-06-27)
2024-06-29 12:36:07 +02:00
Matt Sturgeon
b0d8c00264
lib/vim-plugin: fix + improve settings example
`foo_bar = true` -> `${prefix}foo_bar=1` is incorrect and confusing.

See related issue #1741
2024-06-29 00:09:43 +01:00
Matt Sturgeon
039f6c1973
lib/lua: workaround builtins.match alias issue
It seems that `with lib` isn't (always) bringing `match` into scope
Odd, but we can fix by explicitly using `builtins.match`.
2024-06-28 23:59:39 +01: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
7c35bdb3f7
lib/neovim-plugin: allow overriding settings description
- The `setup` function name can be overridden with `setup`
  (default ".setup")
- The entire `settings` option description can be overridden with
  `settingsDescription`
- `luaName` and `setup` are used in the default description
2024-06-28 22:58:31 +01:00
Matt Sturgeon
c351c175ec
lib/neovim-plugin: support not having settings
Allow callers to explicitly set `settingsOptions = null` to disable
creating the `settings` option.

`settingsOptions` still defaults to `{ }`.
2024-06-28 22:58:30 +01:00