mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-04 18:58:12 +00:00
fix(scope): make sure to parse the ts tree. Fixes #521
This commit is contained in:
parent
9499b944e7
commit
4c55f1c2da
2 changed files with 7 additions and 2 deletions
|
@ -400,6 +400,7 @@ function TSScope:find(opts)
|
|||
if not has_parser or parser == nil then
|
||||
return
|
||||
end
|
||||
parser:parse()
|
||||
|
||||
local line = vim.fn.nextnonblank(opts.pos[1])
|
||||
line = line == 0 and vim.fn.prevnonblank(opts.pos[1]) or line
|
||||
|
@ -763,4 +764,7 @@ function M.setup()
|
|||
end
|
||||
end
|
||||
|
||||
M.TSScope = TSScope
|
||||
M.IdentScope = IndentScope
|
||||
|
||||
return M
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue