From b73f580d1c6da233834e3c858286a9ff6fd66c00 Mon Sep 17 00:00:00 2001 From: arne314 <73391160+arne314@users.noreply.github.com> Date: Thu, 12 Jun 2025 19:17:29 +0200 Subject: [PATCH] fix(snip): markup detection edge case --- lua/typstar/engine.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/typstar/engine.lua b/lua/typstar/engine.lua index 4757b13..77e6778 100644 --- a/lua/typstar/engine.lua +++ b/lua/typstar/engine.lua @@ -23,7 +23,7 @@ M.in_math = function() return utils.cursor_within_treesitter_query(ts_math_query, 0, cursor) and not utils.cursor_within_treesitter_query(ts_string_query, 0, cursor) end -M.in_markup = function() return utils.cursor_within_treesitter_query(ts_markup_query, 2) end +M.in_markup = function() return utils.cursor_within_treesitter_query(ts_markup_query, 1) end M.not_in_math = function() return not M.in_math() end M.not_in_markup = function() return not M.in_markup() end M.snippets_toggle = true