2022-08-09 01:22:35 +00:00
|
|
|
# toggle-checkbox.nvim
|
|
|
|
|
2022-08-09 13:24:10 +00:00
|
|
|
A Neovim plugin for checking and unchecking Markdown checkboxes, written in Lua.
|
2022-08-09 01:22:35 +00:00
|
|
|
|
|
|
|
Inspired by [jkramer/vim-checkbox](https://github.com/jkramer/vim-checkbox).
|
|
|
|
|
|
|
|
## Example
|
|
|
|
|
2022-08-09 13:23:38 +00:00
|
|
|
This is an example of the TODOs that I was using and testing with whilst writing this plugin:
|
2022-08-09 01:22:35 +00:00
|
|
|
|
|
|
|
```markdown
|
|
|
|
- [ ] Check an unchecked checkbox
|
|
|
|
- [x] Uncheck a checked checkbox
|
|
|
|
- [ ] Make check symbol customisable
|
|
|
|
- [x] Make checking toggleable
|
|
|
|
- [x] Determine if a line contains a checked checkbox
|
|
|
|
- [x] Add README
|
|
|
|
- [x] Add example keymaps
|
|
|
|
```
|
|
|
|
|
|
|
|
## Keymaps
|
|
|
|
|
|
|
|
There are no default keymaps but these can be added using `vim.keymap.set()`:
|
|
|
|
|
|
|
|
```lua
|
2022-08-09 13:21:37 +00:00
|
|
|
vim.keymap.set("n", "<leader>tt", ":lua require('toggle-checkbox').toggle()<CR>")
|
2022-08-09 01:22:35 +00:00
|
|
|
```
|