Installing grammar doesn't work if installed tree-sitter is
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
Direzione di ricerca
Inizia leggendo lua/orgmode/utils/treesitter/install.lua, in particolare l’elenco dei compilatori collegato nell’issue, e lua/orgmode/init.lua intorno alla riga 133. Riproduci l’installazione con tree-sitter 0.20 su Ubuntu 24.04; il lavoro è completato quando la grammatica viene installata correttamente oppure il fallimento espone il comando tentato e stderr.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
3629625199b9a45bdb41fa734bc2c6ef86d251bd
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.
- Lingua principale
- Lua
- Stelle
- 3.9k
- Fork
- 192
- Merge medio
- 1g 8h
- PR unite (30g)
- 12
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nvim-orgmode/orgmode
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 73/100
nvim-orgmode/orgmode#1193 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
nvim-orgmode/orgmode#1175 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
nvim-orgmode/orgmode#1173 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
nvim-orgmode/orgmode#1172 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
nvim-orgmode/orgmode#1170 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nvim-orgmode/orgmode
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
fw876/helloworld#2074 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug documentation lua
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100