|
|
@ -80,7 +80,7 @@ local function toggle_todo()
|
|
|
|
vim.api.nvim_set_current_line(line)
|
|
|
|
vim.api.nvim_set_current_line(line)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
vim.keymap.set("n", "<leader>tt", toggle_todo, { desc = "Toggle todo" })
|
|
|
|
vim.keymap.set("n", "<leader>tt", toggle_todo, { desc = "Toggle TODO" })
|
|
|
|
|
|
|
|
|
|
|
|
-- function that checks if the current line doesn't start with the string "- [ ] " and, if it doesn't, adds the string at the beginning of the line
|
|
|
|
-- function that checks if the current line doesn't start with the string "- [ ] " and, if it doesn't, adds the string at the beginning of the line
|
|
|
|
local function add_todo()
|
|
|
|
local function add_todo()
|
|
|
@ -106,7 +106,7 @@ local function add_todo()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
vim.keymap.set("n", "<leader>ta", add_todo, { desc = "Add todo" })
|
|
|
|
vim.keymap.set("n", "<leader>ta", add_todo, { desc = "Add TODO" })
|
|
|
|
|
|
|
|
|
|
|
|
-- function that checks if the current line starts with the string "- [ ]" or "- [x]" and, if it does, removes that string from the line
|
|
|
|
-- function that checks if the current line starts with the string "- [ ]" or "- [x]" and, if it does, removes that string from the line
|
|
|
|
local function remove_todo()
|
|
|
|
local function remove_todo()
|
|
|
@ -122,4 +122,4 @@ local function remove_todo()
|
|
|
|
vim.api.nvim_set_current_line(line)
|
|
|
|
vim.api.nvim_set_current_line(line)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
vim.keymap.set("n", "<leader>td", remove_todo, { desc = "Remove todo" })
|
|
|
|
vim.keymap.set("n", "<leader>td", remove_todo, { desc = "Remove TODO" })
|
|
|
|