Commit graph

1873 commits

Author SHA1 Message Date
seth
5feeb4eef8
flake/dev: make treefmt-nix optional
as this isn't used by consumers, they should be able to remove this
input via `inputs.nixvim.inputs.treefmt-nix.follows = ""`
2024-07-07 16:05:50 -04:00
seth
432a513ccd
flake/dev: make git-hooks optional
as this isn't used by consumers, they should be able to remove this
input via `inputs.nixvim.inputs.git-hooks.follows = ""`. it is
especially important here as `git-hooks` has a large amount of inputs
itself
2024-07-07 16:05:04 -04:00
seth
2f21379b8c
flake/devshell: make devshell optional
as this isn't used by consumers, they should be able to remove this
input via `inputs.nixvim.inputs.devshell.follows = ""`
2024-07-07 16:04:31 -04:00
seth
22a6678279
flake: deduplicate flake-compat 2024-07-07 15:08:33 -04:00
Matt Sturgeon
a6cc4c6c33
modules/files: format files submodule output
Instead of `pkgs.writeText`, use `helpest.writeLua` to ensure the file
is formatted with stylua.
2024-07-07 16:44:17 +01: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
Matt Sturgeon
c12694f4ba
lib/deprecation: add transitionType
Based on `types.coerceTo`, which is like `types.either` but coerces the
left-hand type into the right-hand type.

`transitionType` only shows the right-hand type in its description and
also prints a warning when the left-hand type is used.

Co-authored-by: Silvan Mosberger <contact@infinisil.com>
2024-07-07 16:02:37 +01:00
Stanislav Asunkin
6674dea840 modules/output: fix extraLuaPackages 2024-07-06 20:44:43 +00:00
Matt Sturgeon
843fb302eb
lib/neovim-plugin: allow disabling installPackage
Some plugins may wish to handle package installation themselves.
2024-07-06 13:01:07 +01:00
Matt Sturgeon
04a255ed7e
modules/context: init with isDocs
Replaced the `isDocs` specialArg added in #1807 with an internal module
option.

We should only use `specialArgs` when absolutely necessary, a module or
`_module.args` is preferred, but those aren't available until `config`
is evaluated so they can't be used for `imports`.

The main problem with `specialArgs` is it makes our modules less
portable.

Luckily that shouldn't be an issue for these context flags.
2024-07-06 11:47:41 +01:00
Matt Sturgeon
edc8602d47
docs: use pkgsDoc to build helpers 2024-07-06 00:32:42 +01:00
traxys
367380bd84 modules/output: Remove the initContent option
This (internal) option introduces IFD, and can be substituted internally
with the `initPath` option easily.
If the content is required somewhere users can use readFile on the
initPath, though it will result in an IFD in their project.
2024-07-05 22:08:25 +02:00
traxys
8fbcfcb469 dev: Move assert in derivation for generated file in the derivation definition
If we access the asserts outside the derivation arguments, and inside
the code that _creates_ the derivation then we observe IFD in `nix flake
show`.

This commit fixes it, and allows `nix flake show` to work!

Fixes #1154
2024-07-05 21:53:05 +02:00
traxys
930f5fdd21 plugins/none-ls: Adapt to autogenerated builtin list 2024-07-05 21:36:45 +02:00
traxys
776835b066 generated: Generate the none-ls builitins 2024-07-05 21:36:45 +02:00
traxys
0b93815db5 dev: Add a script to generate the none-ls builtins 2024-07-05 21:36:45 +02:00
Matt Sturgeon
517648dac0
wrappers/standalone: move module to wrappers/modules 2024-07-05 18:28:19 +01:00
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