I honestly don’t understand how to debug LazyVim setup and if anyone can give me pointers I would appreciate. I would like to fish instead of giving me fish . . .
Here is the LazyVim .config/nvim/lua/plugins/neotest.lua I have but reports “no test files found” when I try and use it. I have read treesitter needs to be loaded after the language server but I don’t know if that is happening or how to figure it out. I feel like the egg trying to debug the chicken.
return {
"nvim-neotest/neotest",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-neotest/nvim-nio",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"adrigzr/neotest-mocha",
},
opts = function()
return {
adapters = {
["neotest-mocha"] = {
command = "npx mocha --",
command_args = function(context)
-- The context contains:
-- results_path: The file that json results are written to
-- test_name_pattern: The generated pattern for the test
-- path: The path to the test file
--
-- It should return a string array of arguments
--
-- Not specifying 'command_args' will use the defaults below
local relative_path = vim.fn.fnamemodify(context.path, ":.")
return {
"--full-trace",
"--reporter=json",
"--reporter-options=output=" .. context.results_path,
"--grep=" .. context.test_name_pattern,
relative_path,
}
end,
env = { CI = true },
cwd = function()
return vim.fn.getcwd()
end,
},
},
consumers = {
overseer = require("neotest.consumers.overseer"),
},
}
end,
}```