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.log file in stdpath("log") or stdpath("data").
- Wipe the
neotest-java.log file in stdpath("log") or stdpath("data").
- Set
log_level = vim.log.levels.DEBUG in your neotest setup config.
- Reproduce the issue.
- Provide the new logs.
Additional context
Add any other context about the problem here.
NeoVim Version
Describe the bug
In #153 the
source_diroption was removed. I believe this was a significant feature for my project set up because I usebuild.xmlinstead ofpom.xml. I can run unit tests with<leader>trwith this config:but I cannot run them in the summary window by clicking on them with
ror see their status update because the summary window gives me the errorunknown project type: unknown. I got this error when running the tests and before I added theroot_diroverride innvim-neotest/neotest, but I can't do the same forrcasia/neotst-javawhich means I can't see the status of my tests execution.Expected behavior
Can we add the
source_dirfeature 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
neotest.logfile instdpath("log")orstdpath("data").neotest-java.logfile instdpath("log")orstdpath("data").log_level = vim.log.levels.DEBUGin your neotest setup config.Additional context
Add any other context about the problem here.