Commit graph

98 commits

Author SHA1 Message Date
Quentin Boyer
cab2a30ae1
docs: Create a markdown-it plugin 2024-09-13 12:59:27 +01:00
Matt Sturgeon
6665521525
docs: move pkgs overlays to their own file 2024-09-13 12:26:48 +01:00
Matt Sturgeon
faff32b9f1
plugins/by-name: init
Add support for automatically importing any directories under
`plugins/by-name`.

Includes a validation test, which is run by CI and by the pre-commit hook.
2024-09-09 11:50:38 +01:00
Matt Sturgeon
c4135d720a
flake/pre-commit: check maintainers when modified 2024-09-07 02:08:23 +01:00
Matt Sturgeon
5c929a161f
flake: remove pre-commit from checks output 2024-09-07 02:08:23 +01:00
Matt Sturgeon
e48da949cf
tests/package-options: init
The test ensures "package" options use a "literalExpression" in their
defaultText; i.e. it validates `lib.mkPackageOption` was used to build
the package options.

All options whose `default` is a derivation are covered by the test,
other than submodule sub-options.
2024-09-05 02:24:52 +01:00
Austin Horstman
caefb266be
flake-modules/dev: treefmt ignore .editorconfig 2024-08-31 16:26:49 -05:00
Matt Sturgeon
1c879ec3aa
tests: add regression test for warnings + assertions
Ensure `mkTestDerivationFromNixvimModule` correctly test warnings & assertions.

Also did some minor cleanup:
- Call `failing-tests.nix` using `pkgs.callPackage`
- Replace repetive use of `testBuildFailure` with a wrapper
  `mkFailingNixvimTest`
2024-08-28 00:44:34 +01:00
Matt Sturgeon
60ea38d2c4
tests: test the tests
Adds a regression test for #2076. This test ensures that
`extraConfigLua` is used in `finalPackage` and that the test will fail
correctly when running `nvim` results in unexpected output.
2024-08-27 03:54:43 +01:00
Austin Horstman
45081d5f21
flake-modules/list-plugins: add extra filters
I have been using this more and wanted to create some filters to
onlyoutput the information I cared about. This adds the ability to
filter bykind, state, and whether a plugin has deprecation warnings.
2024-08-24 09:39:29 -05:00
Austin Horstman
3a04cc75e6
flake-modules/dev: add isort 2024-08-24 08:47:04 -05:00
Matt Sturgeon
cbd1003d9d
modules/test: move test derivation to an option
Introduced the `test.derivation` read-only option.
2024-08-21 02:48:00 +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
312db6b6e2
flake-modules/devshell: update tests command with link-farm support
Since we're using link-farms, we need to access the underlying tests as
`passthru.entries.*`.
2024-08-19 03:57:22 +01:00
Austin Horstman
fb4e6c2361
flake-modules/devshell: add getopt runtimeInput
Use a consistent behavior of getopt in launchtests.sh. Wasn't able to
use tests command on macbook without including this because the macOS
getopt didn't support our usage.
2024-08-15 08:02:57 -05:00
Matt Sturgeon
d3cb750e6a
update-scripts: move out of flake
See the explanation in the new update-scripts/README.md file.
2024-08-03 21:56:40 +01:00
Matt Sturgeon
8945b3b5e3
flake/generate-files: fix --commit line count
`echo` pipes all its output at once, so `wc -l` always counts 1 line.

See https://stackoverflow.com/questions/60954221
2024-07-31 14:06:49 +01: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
Matt Sturgeon
3789c69658
flake/generate-files: use nixfmt directly
Running `nix fmt` is unnecessary in this case.
2024-07-31 11:49:28 +01:00
Matt Sturgeon
0b23a4ce85
flake/generate-files: do all builds in one eval 2024-07-31 11:49:28 +01: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
Quentin Boyer
c12e59ff7c doc: Use correct href for nuscht-search
This commit also adds a subdirectory in the docs derivation, to have the
same local structure than what is uploaded on github pages.
2024-07-25 18:23:47 +00:00
Quentin Boyer
4d874f6c11 dev: Make the serve-docs command uncached 2024-07-25 14:00:35 +00:00
traxys
42a7676d5a docs: Add an option search to our documentation 2024-07-25 14:00:35 +00:00
traxys
f1eaf5b617 dev: Allow to pass arguments to nix in tests
This can allow to pass --show-trace for example
2024-07-23 22:03:42 +02:00
traxys
1c75b414cb dev: Allow to choose the system in tests
This is done through the -s/--system <system> option
2024-07-23 21:58:23 +02:00
Gaetan Lepage
901e8760d0 flake-modules/dev: format launch-test.sh 2024-07-22 23:25:28 +02: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
Matt Sturgeon
c1feceda64
dev: fix --commit when the worktree is dirty 2024-07-15 12:11:28 +01:00
Matt Sturgeon
4f3cd9f368
plugins/none-ls: combine packaged+unpackaged lists
We can just make `packaged` nullable again.
2024-07-13 20:20:46 +01:00
Gaetan Lepage
ca01a644ef flake/dev/formatting: run ruff format in isolated mode 2024-07-11 14:59:08 +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
7e3d629bb0
flake/generate-files: add --commit command + fixes
- Added `--commit` with a git-based message
- `nix fmt` only operates on files known to git
- ensure `generated` directory exists
2024-07-10 08:30:03 +01:00
Matt Sturgeon
aad2e32b5a treewide: reformat 2024-07-08 16:24:47 +00:00
Matt Sturgeon
3c786ae988 flake: ignore unformatted files
This suppresses treefmt's "no formatter for path" warnings.
2024-07-08 16:24:47 +00:00
Matt Sturgeon
f1a0cf3a90 flake: format toml using "taplo" 2024-07-08 16:24:47 +00:00
Matt Sturgeon
2339ddc3a0 flake: format lua with "stylua" 2024-07-08 16:24:47 +00:00
Matt Sturgeon
b310affef3 flake: format + lint python with "ruff" 2024-07-08 16:24:46 +00:00
Matt Sturgeon
7c02148e68 flake: format JS & YML with "prettier"
Used for JS and YML files.
Markdown is excluded.
2024-07-08 16:24:46 +00:00
Matt Sturgeon
2583f54225 flake/pre-commit: use treefmt in git hook 2024-07-08 16:24:46 +00:00
Matt Sturgeon
8b9ba44195
flake: remove getHelpers function 2024-07-08 16:24:07 +01:00
Matt Sturgeon
1b7efacdf4
wrappers: bootstrap "helpers" directly
We don't need to pass a `getHelpers` function in, since we can just
import `../lib/helpers.nix`.
2024-07-08 16:24:06 +01:00
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
Matt Sturgeon
f11f991e09
flake/checks: test extraFiles are in the build 2024-07-07 16:43:06 +01:00
Matt Sturgeon
edc8602d47
docs: use pkgsDoc to build helpers 2024-07-06 00:32:42 +01: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
0b93815db5 dev: Add a script to generate the none-ls builtins 2024-07-05 21:36:45 +02:00