nvim-orgmode / nvim-orgmode/orgmode
Orgmode + Treesitter error on ORG_TOGGLE_CHECKBOX
Open
Nobody has claimed this yet.
bug
- Dominant language
- Lua
- Stars
- 3.9k
- Forks
- 190
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Describe the bug
I have an item like
* TODO [ ] Do things
SCHEDULED: <2023-09-08 Fri>
If I want to mark the checkbox, I would normally do <Leader>Space. Now that generates this error
[orgmode] ...ck/packer/start/orgmode/lua/orgmode/utils/treesitter.lua:99: attempt to index local 'node' (a nil value)
Occurs regardless if org is configured for treesitter.
Steps to reproduce
orgmode config
require('orgmode').setup_ts_grammar()
require('orgmode').setup({
org_agenda_files = {'~/org/*'},
org_default_notes_file = '~/org/refile.org',
mappings = {
note = {
org_note_finalize = '<Leader>w',
}
},
})
treesitter config
require'nvim-treesitter.configs'.setup {
ensure_installed = { "org", "vimdoc", "javascript", "typescript", "c", "lua", "rust" },
sync_install = false,
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = {'org'},
},
}
Expected behavior
Box gets checked
Emacs functionality
No response
Minimal init.lua
-- Enter your minimal_init.lua here
Screenshots and recordings
No response
OS / Distro
Debian 11
Neovim version/commit
0.9.1
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with orgmode/utils/treesitter.lua at line 99 and reproduce ORG_TOGGLE_CHECKBOX using the provided Org item and Neovim configuration. Trace why the checkbox toggle reaches a nil node, then verify that the box is checked without the error in the reported setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100