-
Notifications
You must be signed in to change notification settings - Fork 38
Description
NeoVim Version
❯ nvim --version
NVIM v0.11.2
Build type: Release
LuaJIT 2.1.1748459687
Run "nvim -V1 -v" for more info
Describe the bug
In #153 the source_dir option was removed. I believe this was a significant feature for my project set up because I use build.xml instead of pom.xml. I can run unit tests with <leader>tr with this config:
return {
{
"rcasia/neotest-java",
ft = "java",
dependencies = {
"mfussenegger/nvim-jdtls",
"mfussenegger/nvim-dap",
"rcarriga/nvim-dap-ui",
"theHamsta/nvim-dap-virtual-text",
},
},
{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
},
opts = {
adapters = {
["neotest-java"] = {
root_dir = function()
-- Force Neotest to recognize Ant by treating it like Maven
local cwd = vim.fn.getcwd()
if vim.fn.filereadable(cwd .. "/build.xml") == 1 then
return cwd
end
return require("jdtls.setup").find_root({ "pom.xml", "build.gradle", ".git" }) or cwd
end,
ignore_wrapper = true,
force_test_class = true,
incremental_build = true,
extra_args = { "-Dtest=true -Ddomain=test -Djunit.jupiter.execution.parallel.enabled=false" },
},
},
},
},
}but I cannot run them in the summary window by clicking on them with r or see their status update because the summary window gives me the error unknown project type: unknown. I got this error when running the tests and before I added the root_dir override in nvim-neotest/neotest, but I can't do the same for rcasia/neotst-java which means I can't see the status of my tests execution.
Expected behavior
Can we add the source_dir feature back or otherwise help the summary page find the project so it can update the status of the run tests?
A clear and concise description of what you expected to happen.
Logs
- Wipe the
neotest.logfile instdpath("log")orstdpath("data"). - Wipe the
neotest-java.logfile instdpath("log")orstdpath("data"). - Set
log_level = vim.log.levels.DEBUGin your neotest setup config. - Reproduce the issue.
- Provide the new logs.
Additional context
Add any other context about the problem here.