nvim-neotest / neotest

An extensible framework for interacting with tests within NeoVim.
MIT License
2.12k stars 105 forks source link

Fixed empty neotest in Neovim master branch (0.10+) #406

Closed ColinKennedy closed 3 weeks ago

ColinKennedy commented 1 month ago

If you load the root of a project (not a test file), Neotest doesn't seem to ever populate.

image

If you then open a test file, you get this warning:

vim.tbl_islist is deprecated, use vim.islist instead. :help deprecated
Feature will be removed in Nvim 0.12
stack traceback:
        vim/shared.lua: in function 'tbl_islist'
        ...l/.config/nvim/bundle/neotest/lua/neotest/types/tree.lua:67: in function '_from_list'
        ...l/.config/nvim/bundle/neotest/lua/neotest/types/tree.lua:40: in function 'from_list'
        .../nvim/bundle/neotest/lua/neotest/lib/treesitter/init.lua:198: in function 'discover_positions'
        .../.config/nvim/bundle/neotest/lua/neotest/client/init.lua:300: in function <.../.config/nvim/bundle/neotest/lua/neotest/client/init.lua:264>
        [C]: in function 'xpcall'
        .../.config/nvim/bundle/neotest/lua/neotest/client/init.lua:264: in function '_update_positions'
        .../.config/nvim/bundle/neotest/lua/neotest/client/init.lua:438: in function <.../.config/nvim/bundle/neotest/lua/neotest/client/init.lua:400>

This PR fixes both issues.