We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65ccab8 commit af5e04cCopy full SHA for af5e04c
1 file changed
lua/dap-python.lua
@@ -213,7 +213,10 @@ local function get_nodes(query_text, predicate)
213
local end_row = api.nvim_win_get_cursor(0)[1]
214
local ft = api.nvim_buf_get_option(0, 'filetype')
215
assert(ft == 'python', 'test_method of dap-python only works for python files, not ' .. ft)
216
- local query = vim.treesitter.parse_query(ft, query_text)
+ local query = (vim.treesitter.query.parse
217
+ and vim.treesitter.query.parse(ft, query_text)
218
+ or vim.treesitter.parse_query(ft, query_text)
219
+ )
220
assert(query, 'Could not parse treesitter query. Cannot find test')
221
local parser = vim.treesitter.get_parser(0)
222
local root = (parser:parse()[1]):root()
0 commit comments