Describe the bug
I am running LazyVim with python and test extra and for some reason running the Neotest watch toggle and looking for neotest help pages breaks for me. When I run require("neotest").watch.toggle(vim.fn.expand("%")) via <leader>tw I get the following error trace
E5108: Error executing lua: ...bhanot/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: Async task failed without callback: The coroutine failed with this message:
...e/nvim/lazy/neotest/lua/neotest/consumers/watch/init.lua:36: attempt to call field 'supports_method' (a table value)
stack traceback:
...e/nvim/lazy/neotest/lua/neotest/consumers/watch/init.lua: in function 'get_valid_client'
...e/nvim/lazy/neotest/lua/neotest/consumers/watch/init.lua:51: in function 'get_lsp_client'
...e/nvim/lazy/neotest/lua/neotest/consumers/watch/init.lua:110: in function 'watch'
...e/nvim/lazy/neotest/lua/neotest/consumers/watch/init.lua:160: in function 'func'
...bhanot/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:173: in function <...bhanot/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:172>
stack traceback:
[C]: in function 'error'
...bhanot/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:100: in function 'close_task'
...bhanot/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:122: in function 'step'
...bhanot/.local/share/nvim/lazy/nvim-nio/lua/nio/tasks.lua:150: in function 'toggle'
...im/lazy/LazyVim/lua/lazyvim/plugins/extras/test/core.lua:117: in function <...im/lazy/LazyVim/lua/lazyvim/plugins/extras/test/core.lua:117>
To Reproduce
Load LazyVim with above config and open a python file.
Press <leader>tw or run =require("neotest").watch.toggle(vim.fn.expand("%")) to toggle test watch.
nvim --clean -u minimal.lua
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{
"LazyVim/LazyVim",
import = "lazyvim.plugins",
},
{ import = "lazyvim.plugins.extras.test.core" },
{ import = "lazyvim.plugins.extras.dap.core" },
{ import = "lazyvim.plugins.extras.lang.python" },
{ import = "plugins.neotest" },
},
})
NeoVim Version
Describe the bug I am running LazyVim with
python
andtest
extra and for some reason running the Neotest watch toggle and looking for neotest help pages breaks for me. When I runrequire("neotest").watch.toggle(vim.fn.expand("%"))
via<leader>tw
I get the following error traceTo Reproduce
<leader>tw
or run=require("neotest").watch.toggle(vim.fn.expand("%"))
to toggle test watch.Contents of
lua/plugins/neotest.lua