From fd471dfd859ef8fecc042faa98b306b075ce2ff2 Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Fri, 5 Jun 2026 05:14:22 -0400 Subject: [PATCH] fix(treesitter): check installation of parsers before checking if parser is available --- lua/astrocore/treesitter.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lua/astrocore/treesitter.lua b/lua/astrocore/treesitter.lua index 48478cb..3193216 100644 --- a/lua/astrocore/treesitter.lua +++ b/lua/astrocore/treesitter.lua @@ -141,11 +141,9 @@ local function _setup() local _enabled = config.enabled if type(_enabled) == "function" then _enabled = _enabled(lang, args.buf) end if _enabled then + if not installed_checked then M.installed(true) end if not M.has_parser(args.match) then - if config.auto_install then - if not installed_checked then M.installed(true) end - M.install(nil, function() M.enable(args.buf) end) - end + if config.auto_install then M.install(nil, function() M.enable(args.buf) end) end else M.enable(args.buf) end