mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-15 03:34:31 +02:00
plugins/neotest: init
This commit is contained in:
parent
0ee062ed74
commit
975f1ca526
20 changed files with 916 additions and 2 deletions
20
tests/test-sources/plugins/neotest/dart.nix
Normal file
20
tests/test-sources/plugins/neotest/dart.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.dart = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
command = "flutter";
|
||||
use_lsp = true;
|
||||
custom_test_method_names = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
158
tests/test-sources/plugins/neotest/default.nix
Normal file
158
tests/test-sources/plugins/neotest/default.nix
Normal file
|
@ -0,0 +1,158 @@
|
|||
{
|
||||
empty = {
|
||||
plugins.neotest.enable = true;
|
||||
};
|
||||
|
||||
all-adapters = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters = {
|
||||
dart.enable = true;
|
||||
deno.enable = true;
|
||||
dotnet.enable = true;
|
||||
elixir.enable = true;
|
||||
go.enable = true;
|
||||
haskell.enable = true;
|
||||
jest.enable = true;
|
||||
pest.enable = true;
|
||||
phpunit.enable = true;
|
||||
plenary.enable = true;
|
||||
python.enable = true;
|
||||
rspec.enable = true;
|
||||
rust.enable = true;
|
||||
scala.enable = true;
|
||||
testthat.enable = true;
|
||||
vitest.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
defaults = {
|
||||
plugins.neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters = {};
|
||||
settings = {
|
||||
discovery = {
|
||||
enabled = true;
|
||||
concurrent = 0;
|
||||
filter_dir = null;
|
||||
};
|
||||
running = {
|
||||
concurrent = true;
|
||||
};
|
||||
default_strategy = "integrated";
|
||||
log_level = "warn";
|
||||
consumers = {};
|
||||
icons = {
|
||||
child_indent = "│";
|
||||
child_prefix = "├";
|
||||
collapsed = "─";
|
||||
expanded = "╮";
|
||||
failed = "";
|
||||
final_child_indent = " ";
|
||||
final_child_prefix = "╰";
|
||||
non_collapsible = "─";
|
||||
passed = "";
|
||||
running = "";
|
||||
running_animated = ["/" "|" "\\" "-" "/" "|" "\\" "-"];
|
||||
skipped = "";
|
||||
unknown = "";
|
||||
watching = "";
|
||||
};
|
||||
highlights = {
|
||||
adapter_name = "NeotestAdapterName";
|
||||
border = "NeotestBorder";
|
||||
dir = "NeotestDir";
|
||||
expand_marker = "NeotestExpandMarker";
|
||||
failed = "NeotestFailed";
|
||||
file = "NeotestFile";
|
||||
focused = "NeotestFocused";
|
||||
indent = "NeotestIndent";
|
||||
marked = "NeotestMarked";
|
||||
namespace = "NeotestNamespace";
|
||||
passed = "NeotestPassed";
|
||||
running = "NeotestRunning";
|
||||
select_win = "NeotestWinSelect";
|
||||
skipped = "NeotestSkipped";
|
||||
target = "NeotestTarget";
|
||||
test = "NeotestTest";
|
||||
unknown = "NeotestUnknown";
|
||||
watching = "NeotestWatching";
|
||||
};
|
||||
floating = {
|
||||
border = "rounded";
|
||||
max_height = 0.6;
|
||||
max_width = 0.6;
|
||||
options = {};
|
||||
};
|
||||
strategies = {
|
||||
integrated = {
|
||||
height = 40;
|
||||
width = 120;
|
||||
};
|
||||
};
|
||||
summary = {
|
||||
enabled = true;
|
||||
animated = true;
|
||||
follow = true;
|
||||
expandErrors = true;
|
||||
mappings = {
|
||||
attach = "a";
|
||||
clear_marked = "M";
|
||||
clear_target = "T";
|
||||
debug = "d";
|
||||
debug_marked = "D";
|
||||
expand = ["<CR>" "<2-LeftMouse>"];
|
||||
expand_all = "e";
|
||||
jumpto = "i";
|
||||
mark = "m";
|
||||
next_failed = "J";
|
||||
output = "o";
|
||||
prev_failed = "K";
|
||||
run = "r";
|
||||
run_marked = "R";
|
||||
short = "O";
|
||||
stop = "u";
|
||||
target = "t";
|
||||
watch = "w";
|
||||
};
|
||||
open = "botright vsplit | vertical resize 50";
|
||||
};
|
||||
output = {
|
||||
enabled = true;
|
||||
open_on_run = "short";
|
||||
};
|
||||
output_panel = {
|
||||
enabled = true;
|
||||
open = "botright split | resize 15";
|
||||
};
|
||||
quickfix = {
|
||||
enabled = true;
|
||||
open = false;
|
||||
};
|
||||
status = {
|
||||
enabled = true;
|
||||
virtual_text = false;
|
||||
signs = true;
|
||||
};
|
||||
state = {
|
||||
enabled = true;
|
||||
};
|
||||
watch = {
|
||||
enabled = true;
|
||||
symbol_queries = null;
|
||||
filter_path = null;
|
||||
};
|
||||
diagnostic = {
|
||||
enabled = true;
|
||||
severity = "error";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
30
tests/test-sources/plugins/neotest/dotnet.nix
Normal file
30
tests/test-sources/plugins/neotest/dotnet.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.dotnet = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
dap = {
|
||||
args = {justMyCode = false;};
|
||||
adapter_name = "netcoredbg";
|
||||
};
|
||||
custom_attributes = {
|
||||
xunit = ["MyCustomFactAttribute"];
|
||||
nunit = ["MyCustomTestAttribute"];
|
||||
mstest = ["MyCustomTestMethodAttribute"];
|
||||
};
|
||||
dotnet_additional_args = [
|
||||
"--verbosity detailed"
|
||||
];
|
||||
discovery_root = "project";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
tests/test-sources/plugins/neotest/elixir.nix
Normal file
27
tests/test-sources/plugins/neotest/elixir.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.elixir = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mix_task = ["my_custom_task"];
|
||||
extra_formatters = ["ExUnit.CLIFormatter" "ExUnitNotifier"];
|
||||
extra_block_identifiers = ["test_with_mock"];
|
||||
args = ["--trace"];
|
||||
post_process_command.__raw = ''
|
||||
function(cmd)
|
||||
return vim.tbl_flatten({{"env", "FOO=bar"}, cmd})
|
||||
end
|
||||
'';
|
||||
write_delay = 1000;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
tests/test-sources/plugins/neotest/go.nix
Normal file
21
tests/test-sources/plugins/neotest/go.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.go = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
experimental = {
|
||||
test_table = true;
|
||||
};
|
||||
args = ["-count=1" "-timeout=60s"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
26
tests/test-sources/plugins/neotest/haskell.nix
Normal file
26
tests/test-sources/plugins/neotest/haskell.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.haskell = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
build_tools = [
|
||||
"stack"
|
||||
"cabal"
|
||||
];
|
||||
frameworks = [
|
||||
"tasty"
|
||||
"hspec"
|
||||
"sydtest"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
tests/test-sources/plugins/neotest/jest.nix
Normal file
25
tests/test-sources/plugins/neotest/jest.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.jest = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
jestCommand = "npm test --";
|
||||
jestConfigFile = "custom.jest.config.ts";
|
||||
env = {CI = true;};
|
||||
cwd.__raw = ''
|
||||
function(path)
|
||||
return vim.fn.getcwd()
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
26
tests/test-sources/plugins/neotest/pest.nix
Normal file
26
tests/test-sources/plugins/neotest/pest.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.pest = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
ignore_dirs = ["vendor" "node_modules"];
|
||||
root_ignore_files = ["phpunit-only.tests"];
|
||||
test_file_suffixes = ["Test.php" "_test.php" "PestTest.php"];
|
||||
sail_enabled.__raw = "function() return false end";
|
||||
sail_executable = "vendor/bin/sail";
|
||||
pest_cmd = "vendor/bin/pest";
|
||||
parallel = 16;
|
||||
compact = false;
|
||||
results_path.__raw = "function() return '/some/accessible/path' end";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
26
tests/test-sources/plugins/neotest/phpunit.nix
Normal file
26
tests/test-sources/plugins/neotest/phpunit.nix
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.phpunit = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
phpunit_cmd.__raw = ''
|
||||
function()
|
||||
return "vendor/bin/phpunit"
|
||||
end
|
||||
'';
|
||||
root_files = ["composer.json" "phpunit.xml" ".gitignore"];
|
||||
filter_dirs = [".git" "node_modules"];
|
||||
env = {XDEBUG_CONFIG = "idekey=neotest";};
|
||||
dap = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
18
tests/test-sources/plugins/neotest/plenary.nix
Normal file
18
tests/test-sources/plugins/neotest/plenary.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.plenary = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
min_init = "./path/to/test_init.lua";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
tests/test-sources/plugins/neotest/python.nix
Normal file
27
tests/test-sources/plugins/neotest/python.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.python = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
dap.justMyCode = false;
|
||||
args = ["--log-level" "DEBUG"];
|
||||
runner = "pytest";
|
||||
python = ".venv/bin/python";
|
||||
is_test_file.__raw = ''
|
||||
function(file_path)
|
||||
return true
|
||||
end
|
||||
'';
|
||||
pytest_discover_instances = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
38
tests/test-sources/plugins/neotest/rspec.nix
Normal file
38
tests/test-sources/plugins/neotest/rspec.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
defaults = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.rspec = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
rspec_cmd.__raw = ''
|
||||
function()
|
||||
return vim.tbl_flatten({
|
||||
"bundle",
|
||||
"exec",
|
||||
"rspec",
|
||||
})
|
||||
end
|
||||
'';
|
||||
root_files = ["Gemfile" ".rspec" ".gitignore"];
|
||||
filter_dirs = [".git" "node_modules"];
|
||||
transform_spec_path.__raw = ''
|
||||
function(path)
|
||||
return path
|
||||
end
|
||||
'';
|
||||
results_path.__raw = ''
|
||||
function()
|
||||
return async.fn.tempname()
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
19
tests/test-sources/plugins/neotest/rust.nix
Normal file
19
tests/test-sources/plugins/neotest/rust.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.rust = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
args = ["--no-capture"];
|
||||
dap_adapter = "lldb";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
20
tests/test-sources/plugins/neotest/scala.nix
Normal file
20
tests/test-sources/plugins/neotest/scala.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.scala = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
args = ["--no-color"];
|
||||
runner = "bloop";
|
||||
framework = "utest";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
22
tests/test-sources/plugins/neotest/vitest.nix
Normal file
22
tests/test-sources/plugins/neotest/vitest.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
example = {
|
||||
plugins = {
|
||||
treesitter.enable = true;
|
||||
neotest = {
|
||||
enable = true;
|
||||
|
||||
adapters.vitest = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
filter_dir.__raw = ''
|
||||
function(name, rel_path, root)
|
||||
return name ~= "node_modules"
|
||||
end
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue