-
-
Notifications
You must be signed in to change notification settings - Fork 171
Description
Describe the bug
I have tree-sitter 0.20.8 installed (because that is what is in the apt repo for Ubuntu 24.04).
When I run require'orgmode'.setup({...}) I get this error:
Failed to run config for orgmode
...ayne/.local/share/nvim/lazy/orgmode/lua/orgmode/init.lua:133: [orgmode] Failed to compile parser
# stacktrace:
- /orgmode/lua/orgmode/init.lua:133 _in_ **setup**
- ~/.config/nvim/lua/plugins/init.lua:194 _in_ **config**
I believe this is because that version of tree-sitter doesn't have the build subcommand.
checkhealth
==============================================================================
orgmode: 1
Orgmode ~
- ✅ OK Treesitter grammar installed (version 2.0.2)
⚠️ WARNING Setup not called- ✅ OK
org_agenda_filesconfigured - ✅ OK
org_default_notes_fileconfigured
(note: this was after I figured out a workaround to install the grammar)
Steps to reproduce
- On a system with version 0.20 of tree-sitter, go through the installation process.
- Open the editor
- Notice the error message mentioned above
Expected behavior
I should be able to install the grammar and not get the error every time.
Also, it would be nice to get more information on why it failed. Like maybe show me the command it tried to run, and the stderr from running that command. Or write that information to a log file.
I can think of a couple of ways this could be handled:
- Check the tree-sitter version, if it is too old, then use the c compiler mode instead.
- If the tree-sitter version older, then use different arguments. (use build-wasm isntead of build?)
Emacs functionality
No response
Minimal init.lua
{
'nvim-orgmode/orgmode',
event = 'VeryLazy',
config = function()
require'orgmode'.setup({
org_agenda_files = "~/org/**/*",
org_default_notes_file = "~/org/refile.org"
})
end,
},
Screenshots and recordings
No response
nvim-orgmode version
OS / Distro
Ubuntu 24.04
Neovim version/commit
0.11.5
Additional context
If I remove tree-sitter from the list of compilers and it uses my c compiler instead, then it works fine.