mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-12 10:14:31 +02:00
plugins/neotest: add more adapters
This commit is contained in:
parent
975f1ca526
commit
5004178c0c
6 changed files with 109 additions and 2 deletions
|
@ -4,6 +4,9 @@
|
|||
# - Add the adapter to `all-adapters` in `tests/test-sources/plugins/neotest/default.nix`
|
||||
# - Add a more complete test case in `tests/test-sources/plugins/neotest/NAME.nix`
|
||||
{
|
||||
bash = {
|
||||
treesitter-parser = "bash";
|
||||
};
|
||||
dart = {
|
||||
treesitter-parser = "dart";
|
||||
};
|
||||
|
@ -16,15 +19,27 @@
|
|||
elixir = {
|
||||
treesitter-parser = "elixir";
|
||||
};
|
||||
foundry = {
|
||||
treesitter-parser = "solidity";
|
||||
};
|
||||
go = {
|
||||
treesitter-parser = "go";
|
||||
};
|
||||
gradle = {
|
||||
treesitter-parser = "kotlin,java";
|
||||
};
|
||||
haskell = {
|
||||
treesitter-parser = "haskell";
|
||||
};
|
||||
java = {
|
||||
treesitter-parser = "java";
|
||||
};
|
||||
jest = {
|
||||
treesitter-parser = "javascript";
|
||||
};
|
||||
minitest = {
|
||||
treesitter-parser = "ruby";
|
||||
};
|
||||
pest = {
|
||||
treesitter-parser = "php";
|
||||
};
|
||||
|
@ -52,4 +67,7 @@
|
|||
vitest = {
|
||||
treesitter-parser = "javascript";
|
||||
};
|
||||
zig = {
|
||||
treesitter-parser = "zig";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
with lib; let
|
||||
supportedAdapters = import ./adapters-list.nix;
|
||||
|
||||
mkAdapter = name: props: {
|
||||
mkAdapter = name: {treesitter-parser}: {
|
||||
options.plugins.neotest.adapters.${name} = {
|
||||
enable = mkEnableOption name;
|
||||
|
||||
|
@ -30,7 +30,7 @@ with lib; let
|
|||
(!config.plugins.treesitter.enable)
|
||||
''
|
||||
Nixvim (plugins.neotest.adapters.${name}): This adapter requires `treesitter` to be enabled.
|
||||
You might want to set `plugins.treesitter.enable = true` and ensure that the `${props.treesitter-parser}` is enabled.
|
||||
You might want to set `plugins.treesitter.enable = true` and ensure that the `${props.treesitter-parser}` parser is enabled.
|
||||
'';
|
||||
|
||||
plugins.neotest.enabledAdapters = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue