Commit Graph
1970 Commits
Author SHA1 Message Date
Matt Sturgeon 4814147442 modules/test: add config and options passthrus
This should make inspection of tests a little easier.
2024-08-28 00:08:10 +01:00
Matt Sturgeon af31063538 modules/test: switch to runCommand 2024-08-28 00:08:10 +01:00
Austin Horstman 1085bcd7cc plugins/which-key: fix icon examples
Which-key implemented proper icon support, utilize the icon attribute to
properly override/set icons so that alignment doesn't get thrown off and
it's inherited with child mappings.
2024-08-27 12:45:10 -05: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 eac092c876 readme: fix incorrect demo configuration 2024-08-26 17:11:45 -05:00
Sascha Ohms 7e3ed24e52 plugins/lint: fix inconsistent description + examples 2024-08-26 21:07:13 +00:00
Matt Sturgeon 9af4c3970c tests: fix tests by enabling wrapRc
Since cbd1003d9d I'm able to add _some_
invalid config definitions to modules the tests are using and get no
build error.

For example `extraConfigLua = null;` should produce an invalid type
error, but doesn't.

One less visible change in that commit is the move away from using the
"standalone" wrapper (`makeNixvimWithModule`), which implicitly sets
`wrapRc = true`.

Adding back `wrapRc` to the tests seems to fix the issue, however this
makes me wonder if there's an underlying issue with wrapping/not-wrapping?

Perhaps we've simply uncovered a long-standing eval issue that is masked
over by using `wrapRc`?
2024-08-26 21:57:05 +01:00
Matt Sturgeon fa2058970c lib/tests.nix: fix infinite recursion in args 2024-08-26 21:57:05 +01:00
elythh 665680a5ca plugins/lint: fix conform incorrect option description 2024-08-26 21:02:12 +02:00
elythh aa1f5a74ff plugins/comment-box-nvim: init 2024-08-26 20:28:32 +02:00
Austin Horstman 45bb6636e5 tests/lsp: re-enable typst-lsp 2024-08-26 12:07:28 -05:00
Austin Horstman d0564ce4cf tests/example-configuration: re-enable jsonls 2024-08-26 12:02:08 -05:00
github-actions[bot] 9673ea70f4 flake.lock: Update
Flake lock file updates:

• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/ea319a737939094b48fda9063fa3201ef2479aac' (2024-08-24)
  → 'github:lnl7/nix-darwin/ac5694a0b855a981e81b4d9f14052e3ff46ca39e' (2024-08-25)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c374d94f1536013ca8e92341b540eba4c22f9c62' (2024-08-21)
  → 'github:NixOS/nixpkgs/d0e1602ddde669d5beb01aec49d71a51937ed7be' (2024-08-24)
• Updated input 'nuschtosSearch':
    'github:NuschtOS/search/a05d1805f2a2bc47d230e5e92aecbf69f784f3d0' (2024-08-18)
  → 'github:NuschtOS/search/5a08d691de30b6fc28d58ce71a5e420f2694e087' (2024-08-25)
2024-08-26 16:32:17 +00:00
jacek szymanski bb8ecad13c plugins/nvim-jdtls: allow lua on nvim-jdtls.data
Make it possible to set data directory with lua, so it can be project-dependent.
2024-08-25 17:11:45 +02:00
Austin Horstman 8234ee85ea tests/plugins/lightline: fix test
Lightline has an internal list of colorschemes that are supported which
can be found at
https://github.com/itchyny/lightline.vim/blob/master/colorscheme.md
2024-08-24 14:49:36 -05:00
Austin Horstman 89b876dc0d plugins/conform-nvim: migrate to mkNeovimPlugin 2024-08-24 12:24:15 -05:00
Austin Horstman a1c7932bdb plugins/rustaceanvim: fix checkhealth error with neotest configuration
Rustaceanvim will throw an error if the configuration is sourced after
initialization. Our globals are defined at the top of the init.lua so
moving the settings to leverage the globals option and setting a
callback function as default to ensure we dont need to worry about
something initializing it before lspOnAttach is available.
2024-08-24 11:50:06 -05:00
Austin Horstman 1e74f3deab plugins/lsp: make lspOnAttach available globally
Allows plugins to utilize the global nixvim table to access the lsp on
attach function and prevent needing to filter attribute set or manage
the property explicitly in lua.
2024-08-24 11:50:06 -05:00
Austin Horstman 8a272143ee modules/opts: move options to top of init.lua
Using mkOrder to ensure the options can be accessible to everything
throughout the config. Setting right below global table available, so
variables can reference stuff inside global table.
2024-08-24 11:50:06 -05:00
Austin Horstman 203d31810f top-level/output: add global table top of init.lua
Creating a global table at top of init.lua to allow sharing between
different sections of the init.lua without worrying about ordering.
2024-08-24 11:33:08 -05: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
github-actions[bot] 88b1e6a369 flake.lock: Update
Flake lock file updates:

• Updated input 'git-hooks':
    'github:cachix/git-hooks.nix/6cedaa7c1b4f82a266e5d30f212273e60d62cb0d' (2024-08-21)
  → 'github:cachix/git-hooks.nix/c8a54057aae480c56e28ef3e14e4960628ac495b' (2024-08-23)
• Updated input 'home-manager':
    'github:nix-community/home-manager/2598861031b78aadb4da7269df7ca9ddfc3e1671' (2024-08-18)
  → 'github:nix-community/home-manager/c2cd2a52e02f1dfa1c88f95abeb89298d46023be' (2024-08-23)
• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/a8968d88e5a537b0491f68ce910749cd870bdbef' (2024-08-22)
  → 'github:lnl7/nix-darwin/ea319a737939094b48fda9063fa3201ef2479aac' (2024-08-24)
• Updated input 'treefmt-nix':
    'github:numtide/treefmt-nix/1d07739554fdc4f8481068f1b11d6ab4c1a4167a' (2024-08-16)
  → 'github:numtide/treefmt-nix/070f834771efa715f3e74cd8ab93ecc96fabc951' (2024-08-22)
2024-08-24 15:01:55 +02:00
menixator b10ccc5250 docs: fix markdown issue with tree-sitter docs 2024-08-24 10:23:54 +05:00
menixator f4dd8924b1 docs: document how to install custom tree-sitter grammars 2024-08-24 08:11:25 +05:00
Matt Sturgeon 1181535e34 plugins/lsp/extensions: remove with lib + fix mkRaw reference
See https://github.com/nix-community/nixvim/pull/2053#issuecomment-2307961673
2024-08-24 01:55:49 +01:00
Austin Horstman 4c8d3559ac plugins/lightline: migrate to mkNeovimPlugin 2024-08-23 18:26:24 -05:00
Austin Horstman 052ee66dbb docs/mdbook: move description to bottom
Long descriptions for plugins will shove the plugin's source link and
maintainer information far down the page. Since those are fairly short
and the description is a variable size. Moving below to maintain
consistent placement.
2024-08-23 15:07:21 -05:00
Joe Fredette 9033f1cf2d plugins/neotest: fix missing toLuaObject definition 2024-08-23 11:50:21 -04:00
Austin Horstman 1854d591cb tests/plugins/lsp: re-enable tests 2024-08-22 10:26:05 -05:00
Austin Horstman 77cbd0313d plugins/colorschemes: remove with lib; 2024-08-22 10:19:27 -05:00
Austin Horstman fba168aba7 plugins/colorschemes: migrate helpers -> lib.nixvim 2024-08-22 09:57:31 -05:00
Austin Horstman b470800240 plugins/bufferlines/barbar: migrate helpers -> lib.nixvim 2024-08-22 09:43:47 -05:00
Matt Sturgeon fe12a092f6 tests: general cleanup
- Refactor much of `tests/fetch-tests.nix`
- Move `mkTest` up to let-block in `tests/default.nix`
2024-08-22 15:27:56 +01:00
Matt Sturgeon 087f70cb0a tests: remove special case for efmls-configs 2024-08-22 15:27:56 +01:00
Matt Sturgeon 06419627e2 tests/plugins/nvim-osc52: use new test.checkWarnings option 2024-08-22 14:46:55 +01:00
Matt Sturgeon 004181813f tests/plugins/schemastore: don't check warnings
Follow up to a1a3488779

Uses new `test.checkWarnings` option.
2024-08-22 14:46:55 +01:00
Matt Sturgeon 088e584e54 modules/test: check warnings/assertions
Warnings and assertions defined as `config.warnings` and `config.assertions`
respectively will be checked as part of the test derivation, instead of
when evaluating the modules.

Adds new `checkWarnings` and `checkAssertions` test options (default true).
2024-08-22 14:46:55 +01:00
Austin Horstman 83c2844bec plugins/telescope: migrate helpers -> lib.nixvim 2024-08-22 08:10:31 -05:00
Austin Horstman d7b506efdd plugins/neotest: migrate helpers -> lib.nixvim 2024-08-22 08:04:45 -05:00
Matt Sturgeon 511a328aa3 wrappers: add our lib to the host's _module.args
Make our "extended" lib available to host modules as `_module.args.nixvimLib`.

We didn't do this before because `helpers` was too generic of a name,
but `nixvimLib` should be ok.

    { nixvimLib, ... }: {
        programs.nixvim.someOption = nixvimLib.nixvim.mkRaw "print('Hi')";
    }
2024-08-22 13:19:59 +01:00
Matt Sturgeon e555ba13b1 docs/helpers: document the "extended" lib 2024-08-22 13:19:59 +01:00
github-actions[bot] e41696e502 flake.lock: Update
Flake lock file updates:

• Updated input 'git-hooks':
    'github:cachix/git-hooks.nix/bfef0ada09e2c8ac55bbcd0831bd0c9d42e651ba' (2024-08-16)
  → 'github:cachix/git-hooks.nix/6cedaa7c1b4f82a266e5d30f212273e60d62cb0d' (2024-08-21)
• Updated input 'nix-darwin':
    'github:lnl7/nix-darwin/076b9a905af8a52b866c8db068d6da475839d97b' (2024-08-17)
  → 'github:lnl7/nix-darwin/a8968d88e5a537b0491f68ce910749cd870bdbef' (2024-08-22)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8a3354191c0d7144db9756a74755672387b702ba' (2024-08-18)
  → 'github:NixOS/nixpkgs/c374d94f1536013ca8e92341b540eba4c22f9c62' (2024-08-21)
2024-08-22 08:02:37 +00:00
Matt Sturgeon b7f419a759 lib: migrate helpers.nixvimTypes -> lib.types 2024-08-21 07:37:11 +01:00
Matt Sturgeon b414a53649 lib/types: merge into extendedLib 2024-08-21 07:37:11 +01:00
Matt Sturgeon 38b09c1621 modules/test: remove docker dependency 2024-08-21 02:48:26 +01:00
Matt Sturgeon 19d5f4b134 lib/test: move from tests/test-derivation 2024-08-21 02:48:06 +01: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 851edc8df1 lib/modules: add evalNixvim
Evaluates a nixvim config, by default also checking warnings and assertions.

This used internally by the standalone wrapper.
2024-08-20 22:22:53 +01:00
Matt Sturgeon bc7a7ad1d6 module/outputs: use mkIf for wrapRc
Implement the `wrapRc` option using `lib.mkIf` instead of using _real_
`if` branches.
2024-08-20 22:02:29 +01:00