mirror of
https://github.com/folke/snacks.nvim
synced 2025-07-09 22:25:11 +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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: invisible
|
||||||
|
M.TS_ASYNC = (vim.treesitter.languagetree or {})._async_parse ~= nil
|
||||||
|
|
||||||
local hover ---@type snacks.image.Hover?
|
local hover ---@type snacks.image.Hover?
|
||||||
local uv = vim.uv or vim.loop
|
local uv = vim.uv or vim.loop
|
||||||
local dir_cache = {} ---@type table<string, boolean>
|
local dir_cache = {} ---@type table<string, boolean>
|
||||||
|
|
|
@ -107,7 +107,7 @@ local defaults = {
|
||||||
}
|
}
|
||||||
|
|
||||||
---@diagnostic disable-next-line: invisible
|
---@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
|
local id = 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue