fix(compat): properly detect async treesitter parsing

This commit is contained in:
Folke Lemaitre 2025-02-24 10:28:20 +01:00
parent 09ec4adf3f
commit 842605f072
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
2 changed files with 4 additions and 1 deletions

View file

@ -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>

View file

@ -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