mirror of
https://github.com/windwp/nvim-ts-autotag.git
synced 2024-12-28 21:19:16 -06:00
fix: wrap vim.treesitter.get_parser in pcall
This commit is contained in:
parent
62db4b3054
commit
5c93dfdfb3
@ -430,8 +430,8 @@ local is_before_arrow = is_before("<", 0)
|
||||
|
||||
M.rename_tag = function()
|
||||
if is_before_word() then
|
||||
local parser = vim.treesitter.get_parser()
|
||||
if not parser then
|
||||
local ok, parser = pcall(vim.treesitter.get_parser)
|
||||
if not ok then
|
||||
return
|
||||
end
|
||||
parser:parse(true)
|
||||
|
Loading…
Reference in New Issue
Block a user