plugins/neotest: move to by-name

This commit is contained in:
Austin Horstman 2024-09-09 13:00:29 -05:00
parent 0f83298f2c
commit 9d323f3ec7
No known key found for this signature in database
26 changed files with 0 additions and 2 deletions

View 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 = [ ];
};
};
};
};
};
}

View file

@ -0,0 +1,182 @@
{
empty = {
plugins.neotest.enable = true;
};
all-adapters = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters = {
bash.enable = true;
dart.enable = true;
deno.enable = true;
dotnet.enable = true;
elixir.enable = true;
foundry.enable = true;
go.enable = true;
golang.enable = true;
gradle.enable = true;
# We cannot test neotest-gtest as it tries to create file in the upper directory
# https://github.com/alfaix/neotest-gtest/blob/6e794ac91f4c347e2ea5ddeb23d594f8fc64f2a8/lua/neotest-gtest/utils.lua#L10-L16
gtest.enable = false;
hardhat.enable = true;
haskell.enable = true;
java.enable = true;
jest.enable = true;
minitest.enable = true;
pest.enable = true;
phpunit.enable = true;
playwright.enable = true;
plenary.enable = true;
python.enable = true;
rspec.enable = true;
rust.enable = true;
scala.enable = true;
testthat.enable = true;
vitest.enable = true;
zig.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";
};
};
};
};
}

View 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";
};
};
};
};
};
}

View file

@ -0,0 +1,30 @@
{
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;
};
};
};
};
};
}

View file

@ -0,0 +1,38 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.foundry = {
enable = true;
settings = {
foundryCommand = "forge test";
foundryConfig = null;
env = { };
cwd.__raw = ''
function ()
return lib.files.match_root_pattern("foundry.toml")
end
'';
filterDir.__raw = ''
function(name)
return (
name ~= "node_modules"
and name ~= "cache"
and name ~= "out"
and name ~= "artifacts"
and name ~= "docs"
and name ~= "doc"
-- and name ~= "lib"
)
end
'';
};
};
};
};
};
}

View file

@ -0,0 +1,24 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.go = {
enable = true;
settings = {
experimental = {
test_table = true;
};
args = [
"-count=1"
"-timeout=60s"
];
};
};
};
};
};
}

View file

@ -0,0 +1,26 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.golang = {
enable = true;
settings = {
dap_go_enabled = true;
testify_enabled = false;
warn_test_name_dupes = true;
warn_test_not_executed = true;
args = [
"-v"
"-race"
"-count=1"
];
};
};
};
};
};
}

View file

@ -0,0 +1,58 @@
{
example = {
# We cannot test neotest-gtest as it tries to create file in the upper directory
# https://github.com/alfaix/neotest-gtest/blob/6e794ac91f4c347e2ea5ddeb23d594f8fc64f2a8/lua/neotest-gtest/utils.lua#L10-L16
test.runNvim = false;
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.gtest = {
enable = true;
settings = {
root.__raw = ''
require("neotest.lib").files.match_root_pattern(
"compile_commands.json",
"compile_flags.txt",
"WORKSPACE",
".clangd",
"init.lua",
"init.vim",
"build",
".git"
)
'';
debug_adapter = "codelldb";
is_test_file.__raw = ''
function(file)
end
'';
history_size = 3;
parsing_throttle_ms = 10;
mappings = {
configure = null;
};
summary_view = {
header_length = 80;
shell_palette = {
passed = "\27[32m";
skipped = "\27[33m";
failed = "\27[31m";
stop = "\27[0m";
bold = "\27[1m";
};
};
extra_args = [ ];
filter_dir.__raw = ''
function(name, rel_path, root)
end
'';
};
};
};
};
};
}

View 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"
];
};
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.java = {
enable = true;
settings = {
ignore_wrapper = false;
};
};
};
};
};
}

View file

@ -0,0 +1,27 @@
{
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
'';
};
};
};
};
};
}

View file

@ -0,0 +1,27 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.minitest = {
enable = true;
settings = {
test_cmd.__raw = ''
function()
return vim.tbl_flatten({
"bundle",
"exec",
"rails",
"test",
})
end
'';
};
};
};
};
};
}

View file

@ -0,0 +1,33 @@
{
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";
};
};
};
};
};
}

View file

@ -0,0 +1,35 @@
{
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;
};
};
};
};
};
}

View file

@ -0,0 +1,47 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.playwright = {
enable = true;
settings.options = {
persist_project_selection = false;
enable_dynamic_test_discovery = false;
preset = "none";
get_playwright_binary.__raw = ''
function()
return vim.loop.cwd() + "/node_modules/.bin/playwright"
end
'';
get_playwright_config.__raw = ''
function()
return vim.loop.cwd() + "/playwright.config.ts"
end
'';
get_cwd.__raw = ''
function()
return vim.loop.cwd()
end
'';
env = { };
extra_args = [ ];
filter_dir.__raw = ''
function(name, rel_path, root)
return name ~= "node_modules"
end
'';
is_test_file.__raw = ''
function(file_path)
return string.match(file_path, "my-project's-vitest-tests-folder")
end
'';
};
};
};
};
};
}

View 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";
};
};
};
};
};
}

View file

@ -0,0 +1,30 @@
{
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;
};
};
};
};
};
}

View file

@ -0,0 +1,45 @@
{
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
'';
};
};
};
};
};
}

View file

@ -0,0 +1,19 @@
{
example = {
plugins = {
treesitter.enable = true;
neotest = {
enable = true;
adapters.rust = {
enable = true;
settings = {
args = [ "--no-capture" ];
dap_adapter = "lldb";
};
};
};
};
};
}

View 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";
};
};
};
};
};
}

View 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
'';
};
};
};
};
};
}