{"id":13525872,"url":"https://github.com/nfrid/markdown-togglecheck","last_synced_at":"2025-04-01T06:30:37.354Z","repository":{"id":127721276,"uuid":"562991439","full_name":"nfrid/markdown-togglecheck","owner":"nfrid","description":"Simple neovim plugin to toggle checkboxes in markdown","archived":false,"fork":false,"pushed_at":"2023-09-04T16:36:08.000Z","size":4,"stargazers_count":20,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-01T21:18:53.601Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfrid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-11-07T17:21:35.000Z","updated_at":"2024-07-14T10:37:37.000Z","dependencies_parsed_at":"2024-01-03T03:29:24.273Z","dependency_job_id":"72dcf407-e804-4573-975a-813fb8b30364","html_url":"https://github.com/nfrid/markdown-togglecheck","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfrid%2Fmarkdown-togglecheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfrid%2Fmarkdown-togglecheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfrid%2Fmarkdown-togglecheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfrid%2Fmarkdown-togglecheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfrid","download_url":"https://codeload.github.com/nfrid/markdown-togglecheck/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246596544,"owners_count":20802843,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:23.023Z","updated_at":"2025-04-01T06:30:37.033Z","avatar_url":"https://github.com/nfrid.png","language":"Lua","readme":"# markdown-togglecheck\n\nStupidly simple neovim plugin that toggles task list check boxes in markdown\nusing treesitter.\n\n## Requirements\n\nThis plugin requires my other plugin -\n[treesitter-utils](https://github.com/nfrid/treesitter-utils).\n\n## Installation\n\nUse your favorite package manager.\n\n`lazy.nvim`:\n```lua\n{\n  'nfrid/markdown-togglecheck',\n  dependencies = { 'nfrid/treesitter-utils' },\n  ft = { 'markdown' },\n}\n```\n\n## Setup\n\nYou **don't need** to execute a setup function to use the defaults but in case you\nwant to redefine them, you can do it with `setup`:\n\n```lua\nrequire('markdown-togglecheck').setup({\n  -- create empty checkbox on item without any while toggling\n  create = true,\n  -- remove checked checkbox instead of unckecking it while toggling\n  remove = false,\n})\n```\n\n## Usage\n\nThe plugin does not provide default keybindings.\n\nYou should define them yourself:\n\n```lua\n-- toggle checked / create checkbox if it doesn't exist\nvim.keymap.set('n', '\u003cleader\u003enn', require('markdown-togglecheck').toggle, { desc = 'Toggle Checkmark' });\n-- toggle checkbox (it doesn't remember toggle state and always creates [ ])\nvim.keymap.set('n', '\u003cleader\u003enN', require('markdown-togglecheck').toggle_box, { desc = 'Toggle Checkbox' });\n```\n\nIf you need dot repeat for this plugin you can use `operatorfunc` to bind the keys\n(they'll work the same way but will provide . repeat functionality):\n\n```lua\nlocal function toggle()\n    vim.go.operatorfunc = \"v:lua.require'markdown-togglecheck'.toggle\"\n    return 'g@l'\nend\n\nlocal function toggle_box()\n    vim.go.operatorfunc = \"v:lua.require'markdown-togglecheck'.toggle_box\"\n    return 'g@l'\nend\n\nvim.keymap.set('n', '\u003cleader\u003enn', toggle, { expr = true, desc = 'Toggle Checkmark' })\nvim.keymap.set('n', '\u003cleader\u003enN', toggle_box, { expr = true, desc = 'Toggle Checkbox' })\n```\n\nYou also might add some highlight queries yourself for the check boxes. For\nexample:\n\n```query\n;; YOUR_CONFIG/after/queries/markdown/highlights.scm\n\n; inherits: markdown\n\n(task_list_marker_unchecked) @comment\n(task_list_marker_checked) @function\n```\n\n## Todo\n\n- replace treesitter-utils with new treesitter api\n","funding_links":[],"categories":["Programming Languages Support"],"sub_categories":["Markdown and LaTeX"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfrid%2Fmarkdown-togglecheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfrid%2Fmarkdown-togglecheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfrid%2Fmarkdown-togglecheck/lists"}