You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 months ago | |
---|---|---|
lua/todoer | 2 months ago | |
plugin | 2 months ago | |
.gitignore | 2 months ago | |
README.md | 2 months ago | |
TODO.md | 2 years ago |
README.md
Todoer.nvim - Enhanced TODO Management for Neovim
A Neovim plugin that provides enhanced TODO list management with smart handling of checkboxes, indentation, and list items in markdown and other text formats.
Features
✅ Current Functionality:
- Smart TODO item creation with
<leader>ti
,<leader>ta
,<leader>to
- Toggle checkboxes with
<leader>tt
- Remove TODO markup with
<leader>td
- Smart Enter key handling in insert mode:
- Creates new TODO items with proper indentation
- Handles empty TODO items by outdenting or terminating lists
- Tab/Shift-Tab indentation for TODO items
- Supports multiple list markers:
-
,*
,+
- Works with markdown, text, and norg files by default
Known Issues
🐛 Current Bugs:
- Tab indentation handling still uses feedkeys and needs refactoring
- Shift-Tab behavior may not be consistent with spaces vs tabs
- Enter key () handling has several issues:
- Doesn't properly handle empty lines after TODO items
- Cursor positioning can be incorrect in some cases
- Outdenting behavior is inconsistent
- Edge cases with mixed indentation (spaces + tabs) not fully handled
- Cursor positioning could be improved in several scenarios
- Debug output is currently only enabled for Tab/Shift-Tab but not other operations
Roadmap
📌 Planned Improvements:
- Refactor tab indentation to use proper buffer operations
- Fix Enter key handling for all cases
- Add consistent debug output for all operations
- Improve cursor positioning logic
- Handle empty lines and edge cases better
- Add support for numbered lists
- Add support for nested TODO items with proper indentation
- Add visual selection operations for multiple TODOs
- Add commands for archiving completed items
- Add support for custom TODO markers
- Add support for custom checkbox states (e.g.,
[ ]
,[x]
,[-]
)
Installation
Using lazy.nvim:
{
'your-username/todoer.nvim',
config = function()
require('todoer').setup({
-- Optional: override default filetypes
filetypes = { 'markdown', 'text', 'norg' }
})
end
}
Debugging Recommendations
To help diagnose issues, you can:
- Add
debug_line()
calls to key functions likepress_enter()
- Create a debug mode that can be toggled via:
local debug_mode = false
- Make debug output more structured with timestamps and operation types
- Log cursor positions before/after operations
- Add validation of line states after modifications
Example debug output format:
[DEBUG] [TIMESTAMP] [OPERATION]
Line: 42
Before: {indent=" ", marker="-", is_todo=true}
After: {indent=" ", marker="-", is_todo=true}
Cursor: {lnum=42, col=6} -> {lnum=43, col=4}
Configuration
Default configuration:
{
filetypes = { "markdown", "text", "norg" } -- Filetypes to activate the plugin for
}
Keybindings
Normal Mode:
<leader>ti
- Convert line to TODO (cursor after]
)<leader>ta
- Convert line to TODO (cursor at end)<leader>to
- Insert new TODO line below<leader>tt
- Toggle checkbox state<leader>td
- Remove TODO markup
Insert Mode:
<CR>
- Smart enter behavior for TODO items<Tab>
- Indent TODO item<S-Tab>
- Outdent TODO item