diff options
| author | moxie <moxie@3kgcat.fi> | 2026-03-16 07:21:15 +0200 |
|---|---|---|
| committer | moxie <moxie@3kgcat.fi> | 2026-03-16 07:21:15 +0200 |
| commit | 98cbd80d5f56f3ce73e4819c3776ff5543accac3 (patch) | |
| tree | 2608134d92388b41fce667e1b4ab2827b11d0bc3 /doc/muwiki.txt | |
| parent | 5ac2b3e08ca1cdaa3939e8f8446745925fb6a160 (diff) | |
feat: add todo list
Diffstat (limited to 'doc/muwiki.txt')
| -rw-r--r-- | doc/muwiki.txt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/muwiki.txt b/doc/muwiki.txt index 26faa65..1b5fb24 100644 --- a/doc/muwiki.txt +++ b/doc/muwiki.txt @@ -13,6 +13,7 @@ CONTENTS *muwiki-contents* 7.1 Auto-create directories ............................. |muwiki-autocmd-mkdir| 7.2 Add template for new files .......................... |muwiki-autocmd-template| 7.3 Open with menu examples ............................. |muwiki-autocmd-open-with| + 7.4 Toggle checkbox ..................................... |muwiki-autocmd-toggle-checkbox| 8. Health Check ............................................ |muwiki-health| ============================================================================== @@ -173,6 +174,12 @@ muwiki.wiki_root({bufnr}) *muwiki.wiki_root()* Get the wiki root directory for a buffer. Returns the path or nil if buffer is not in a wiki. +muwiki.toggle_checkbox() *muwiki.toggle_checkbox()* + Toggle the checkbox at cursor position using treesitter. + Also toggles all nested child checkboxes to match the + parent's new state. Works when cursor is anywhere on + the line. + ============================================================================== 7. AUTOCOMMANDS & RECIPES *muwiki-autocmd* @@ -270,6 +277,20 @@ Custom open handler using get_link()~ *muwiki-a }) < +Toggle checkbox with Shift+T~ *muwiki-autocmd-toggle-checkbox* +> + vim.api.nvim_create_autocmd("FileType", { + pattern = "markdown", + callback = function(args) + if not muwiki.wiki_root(args.buf) then return end + vim.keymap.set('n', '<S-t>', muwiki.toggle_checkbox, + { buffer = args.buf, desc = "Toggle checkbox" }) + end, + }) +< +This will toggle the checkbox at cursor position and all nested child +checkboxes to match the parent's new state. + ============================================================================== 8. HEALTH CHECK *muwiki-health* |
