From 0860db73ae6fd9a6f6347219d820bf026a6b8b91 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Sun, 27 Sep 2026 17:38:39 +0200 Subject: * MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated-commit-by: dots Signed-off-by: Robert Günzler --- .config/nvim/after/ftplugin/todotxt.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to '.config/nvim/after/ftplugin/todotxt.lua') diff --git a/.config/nvim/after/ftplugin/todotxt.lua b/.config/nvim/after/ftplugin/todotxt.lua index 526f29c..d5091b3 100644 --- a/.config/nvim/after/ftplugin/todotxt.lua +++ b/.config/nvim/after/ftplugin/todotxt.lua @@ -1 +1,14 @@ vim.opt_local.textwidth = 0 + +vim.keymap.set('n', '', function() + require('mod.utils').edit_current_line(function(lines) + -- will only run for the current line + return vim.tbl_map(function(ln) + if string.sub(ln, 1, 2) == 'x ' then + return string.sub(ln, 3, -1) + else + return 'x ' .. ln + end + end, lines) + end) +end, { desc = 'Check todo', buffer = 0 }) -- cgit 1.4.1