AutoYADM commit: 2024-11-12 17:00:02
This commit is contained in:
parent
35daf0b6f2
commit
aa8ee1ee93
2 changed files with 6 additions and 4 deletions
|
@ -4,9 +4,10 @@ local ts_utils = require("nvim-treesitter.ts_utils")
|
|||
|
||||
M.isCursorInList = function()
|
||||
local node = ts_utils.get_node_at_cursor()
|
||||
print(node)
|
||||
while node do
|
||||
-- Check if node is a list item
|
||||
if node:type() == "list_item" then
|
||||
if (node:type() == "list_item") or (node:type() == "list_item_content") then
|
||||
return true
|
||||
end
|
||||
node = node:parent()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue