AutoYADM commit: 2024-11-12 15:30:02

This commit is contained in:
Daniel Fichtinger 2024-11-12 15:30:02 -05:00
parent 52e9bd2535
commit 35daf0b6f2
2 changed files with 28 additions and 1 deletions

View file

@ -0,0 +1,17 @@
local M = {}
local ts_utils = require("nvim-treesitter.ts_utils")
M.isCursorInList = function()
local node = ts_utils.get_node_at_cursor()
while node do
-- Check if node is a list item
if node:type() == "list_item" then
return true
end
node = node:parent()
end
return false
end
return M