Skip to content
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

Log failure to find the associated language tree-sitter grammar #820

Closed
kirawi opened this issue Oct 10, 2021 · 1 comment · Fixed by #895
Closed

Log failure to find the associated language tree-sitter grammar #820

kirawi opened this issue Oct 10, 2021 · 1 comment · Fixed by #895
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-good-first-issue Call for participation: Issues suitable for new contributors

Comments

@kirawi
Copy link
Member

kirawi commented Oct 10, 2021

When users report not having syntax highlighting, this is usually (if not always) because the compiled language grammars are not present in their runtime/grammars folder. We should log an error in this case. This is probably as simple as .map_err() on a Result somewhere in helix-view/src/document.rs like in #746.

@kirawi kirawi added C-enhancement Category: Improvements A-helix-term Area: Helix term improvements E-good-first-issue Call for participation: Issues suitable for new contributors labels Oct 10, 2021
@archseer
Copy link
Member

It's valid to define a new language without a matching tree-sitter grammar though (let's say if you have a LSP but no grammar). If we do log it, it should probably be a debug level log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements E-good-first-issue Call for participation: Issues suitable for new contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants