mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-08 05:35:12 +00:00
fix(compat): properly detect async treesitter parsing
This commit is contained in:
parent
09ec4adf3f
commit
842605f072
2 changed files with 4 additions and 1 deletions
|
@ -81,6 +81,9 @@ M.transforms = {
|
|||
end,
|
||||
}
|
||||
|
||||
---@diagnostic disable-next-line: invisible
|
||||
M.TS_ASYNC = (vim.treesitter.languagetree or {})._async_parse ~= nil
|
||||
|
||||
local hover ---@type snacks.image.Hover?
|
||||
local uv = vim.uv or vim.loop
|
||||
local dir_cache = {} ---@type table<string, boolean>
|
||||
|
|
|
@ -107,7 +107,7 @@ local defaults = {
|
|||
}
|
||||
|
||||
---@diagnostic disable-next-line: invisible
|
||||
M.TS_ASYNC = vim.treesitter.languagetree._async_parse ~= nil
|
||||
M.TS_ASYNC = (vim.treesitter.languagetree or {})._async_parse ~= nil
|
||||
|
||||
local id = 0
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue