Skip to content

Orgmode + Treesitter error on ORG_TOGGLE_CHECKBOX #609

Open
@kevinroleke

Description

@kevinroleke

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions