-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot open md file with bash codeblock #2631
Comments
You installed from source, yes? You'll need to re-link your That error happens when the tree-sitter query analysis fails - in this case because the |
Thank you for your response and explanation. |
I think an error message displayed within the editor would be better than panicking here. |
I think even just kicking an error message to the logs and falling back to no highlight would be ok. It might be hard to figure out which query is failing and why if it's an error in the statusline since some of the error messages are long |
Summary
Helix panics when opening markdown containing bash codeblocks (beginning with
```bash
).Reproduction Steps
Create a file
bash.md
containing the following:hx bash.md
or:o bash.md
from within helixError
--grammar fetch
and--grammar build
didn't solve it.Removing
runtime/queries/bash/highlights.scm
allows the file to open.Perhaps the problem lies with https://github.com/tree-sitter/tree-sitter-bash which is referenced in
languages.toml
, but that's where I found myself out of my depth.Still, it seems strange that bash would crash a
.md
file.If
```shell
is used instead, that opens fine.Helix log
n/a
Platform
Linux (Pop!_OS 22.04)
Terminal Emulator
gnome-terminal
Helix Version
helix 22.05 (fc666db)
The text was updated successfully, but these errors were encountered: