mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 03:48:18 +00:00
fix(treesitter): suppress get_parser warnings via opts.error
This commit is contained in:

committed by
Christian Clason

parent
7b71fdbc1e
commit
0f067cd34d
@@ -33,7 +33,7 @@ end
|
||||
--- Show a table of contents for the help buffer in a loclist
|
||||
function M.show_toc()
|
||||
local bufnr = vim.api.nvim_get_current_buf()
|
||||
local parser = assert(vim.treesitter._get_parser(bufnr, 'vimdoc'), 'vimdoc parser not found.')
|
||||
local parser = assert(vim.treesitter.get_parser(bufnr, 'vimdoc', { error = false }))
|
||||
local query = vim.treesitter.query.parse(
|
||||
parser:lang(),
|
||||
[[
|
||||
|
Reference in New Issue
Block a user