Neovim Lua Set Quickfix List¶
Say you have two python test files like this.
# app/tests/test_something_too.py
# ...
def test_if_something_happens_too(): # line number 40
...
# ...
Create QF Using search patterns¶
local qf_items = {
{
filename = "app/tests/test_something.py",
pattern = "test_if_something_happens",
},
{
filename = "app/tests/test_something_too.py",
pattern = "test_if_something_happens_too",
},
}
vim.fn.setqflist({}, 'r', {title="Test results", items=qf_items})