Update
This commit is contained in:
@@ -47,7 +47,7 @@ end
|
||||
-- For typst
|
||||
M.in_mathzone_typ = function()
|
||||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local node = vim.treesitter.get_node({ bufnr = 0, pos = { row - 1, col } })
|
||||
local node = vim.treesitter.get_node({ bufnr = 0, pos = { row - 1, col - 1} })
|
||||
while node do
|
||||
if node:type() == "math" then
|
||||
return true
|
||||
@@ -59,7 +59,7 @@ end
|
||||
|
||||
M.in_mathzone_tex = function()
|
||||
local row, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
local node = vim.treesitter.get_node({ bufnr = 0, pos = { row - 1, col - 1 } })
|
||||
local node = vim.treesitter.get_node({ bufnr = 0, pos = { row - 1, col - 1} })
|
||||
while node do
|
||||
if MATH_NODES[node:type()] then
|
||||
return true
|
||||
|
||||
Reference in New Issue
Block a user