aboutsummaryrefslogtreecommitdiff
path: root/lua/muwiki/todo.lua
diff options
context:
space:
mode:
authormoxie <moxie@3kgcat.fi>2026-03-17 12:20:47 +0200
committermoxie <moxie@3kgcat.fi>2026-03-17 12:20:47 +0200
commit1b373a2dc4d0aa9abad1e87a18deeb764c38f813 (patch)
treefb8e94aaf649cd7e10b29c5587e8421a5df606b6 /lua/muwiki/todo.lua
parentbffcccb893de306fbab01082888356a30d9ea69e (diff)
chore: change x to XHEADmaster
Diffstat (limited to 'lua/muwiki/todo.lua')
-rw-r--r--lua/muwiki/todo.lua12
1 files changed, 6 insertions, 6 deletions
diff --git a/lua/muwiki/todo.lua b/lua/muwiki/todo.lua
index 6978c54..5b7d1a3 100644
--- a/lua/muwiki/todo.lua
+++ b/lua/muwiki/todo.lua
@@ -81,12 +81,12 @@ function M.toggle_list_item(bufnr, node)
for child in node:iter_children() do
local child_type = child:type()
if child_type == 'task_list_marker_unchecked' then
- -- Replace [ ] with [x]
+ -- Replace [ ] with [X]
local start_row, start_col, end_row, end_col = child:range()
- vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[x]' })
- return 'x'
+ vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[X]' })
+ return 'X'
elseif child_type == 'task_list_marker_checked' then
- -- Replace [x] with [ ]
+ -- Replace [X] with [ ]
local start_row, start_col, end_row, end_col = child:range()
vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[ ]' })
return ' '
@@ -119,10 +119,10 @@ end
function M.force_list_item_state(bufnr, node, target_state)
for child in node:iter_children() do
local child_type = child:type()
- if child_type == 'task_list_marker_unchecked' and target_state == 'x' then
+ if child_type == 'task_list_marker_unchecked' and target_state == 'X' then
-- Need to check it
local start_row, start_col, end_row, end_col = child:range()
- vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[x]' })
+ vim.api.nvim_buf_set_text(bufnr, start_row, start_col, end_row, end_col, { '[X]' })
return
elseif child_type == 'task_list_marker_checked' and target_state == ' ' then
-- Need to uncheck it