a ver si así sí

main
borja 1 year ago
parent f829721373
commit 99e9d3790e

@ -64,22 +64,15 @@ local function add_todo()
line = "- [ ] " .. line
vim.api.nvim_set_current_line(line)
elseif index == 1 and spaces > 0 then
local trimedline = string.sub(line, spaces + 1)
local spacestring = ""
for x = 1, spaces, 1 do
spacestring = spacestring .. " "
end
line = spacestring .. "- [ ] " .. line
line = spacestring .. "- [ ] " .. trimedline
vim.api.nvim_set_current_line(line)
end
end
-- if not string.sub(line, 1, 1) == " " then
-- line = "- [ ] " .. line
-- vim.api.nvim_set_current_line(line)
-- else
-- line = "- [ ]" .. line
-- vim.api.nvim_set_current_line(line)
-- end
-- end
end
vim.keymap.set("n", "<leader>ta", add_todo, { desc = "Add todo" })

Loading…
Cancel
Save