-
-
Notifications
You must be signed in to change notification settings - Fork 168
Description
Describe the bug
I get the error message attempt to index local 'file' (a nil value) when trying to collapse a TODO heading I have opened prior to refreshing (r) the agenda view.
I noticed this in :checkhealth but the missing file, highlights.scm, is there when I check in the directory (as well as injections.scm).
## The following errors have been detected:
- ERROR: org(highlights): ...s\Neovim\share\nvim\runtime/lua/vim/treesitter/query.lua:161: query: error at position 672
org(highlights) is concatenated from the following files:
| [ERROR]:"C:\Users\redacted\AppData\Local\nvim-data\site\pack\paqs\start\orgmode\queries\org\highlights.scm", failed to load: ...s\Neovim\share\nvim\runtime/lua/vim/treesitter/query.lua:161: query: error at position 672
...
vim.treesitter: require("vim.treesitter.health").check()
========================================================================
- INFO: Runtime ABI version : 13
- OK: Loaded parser for org: ABI version 13
- OK: Loaded parser for c: ABI version 13
Steps to reproduce
- open an org file
- expand at least one TODO headline
- view the agenda
- refresh the agenda
- attempt to collapse the TODO headline previously expanded
- expand any other TODO headline
- attempt to collapse those TODO headlines
Expected behavior
Headlines will collapse without error.
Emacs functionality
It works!
Minimal init.lua
-- Load custom tree-sitter grammar for org filetyp
require('orgmode').setup_ts_grammar()
-- Tree-sitter configuration
require'nvim-treesitter.configs'.setup {
-- If TS highlights are not enabled at all, or disabled via disable prop, highlighting will fallback to default Vim syntax highlighting
highlight = {
enable = true,
disable = {'org'}, -- Remove this to use TS highlighter for some of the highlights (Experimental)
additional_vim_regex_highlighting = {'org'}, -- Required since TS highlighter doesn't support all syntax features (conceal)
},
ensure_installed = {'org'}, -- Or run :TSUpdate org
}
require('orgmode').setup({
org_agenda_files = 'C:/Users/redact/Documents/Notebooks/*',
org_default_notes_file = 'C:/Users/redact/Documents/Notebooks/refile.org',
org_todo_keywords = {'TODO', 'INPROGRESS', 'WAITING','DONE'}
})
Screenshots and recordings
OS / Distro
Windows 10
Neovim version/commit
0.6.1
Additional context
My home directory, ~, is different when working from home (local c:\users\redacted) vs at the office (network mounted m:)
