You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When installed with the syntax extra, the TextArea assumes that all of the binaries for the "built-in" languages for tree-sitter will be present. However, this may not be the case; for example (in the lijnked issue), Conda (micromamba) seems to struggle with installing the language binaries, and they may be missing on some platforms.
In that case, initializing a TextArea with a built-in language name will raise an OSError, which is not handled by the widget. I think it would be better to handle this error and re-raise as a SyntaxAwareDocumentError, so the TextArea degrades instead of crashes.
I'll be opening a PR with a simple fix for this shortly.
I'm upstreaming tconbeer/harlequin#420 (ultimately from a Harlequin user).
When installed with the
syntax
extra, the TextArea assumes that all of the binaries for the "built-in" languages for tree-sitter will be present. However, this may not be the case; for example (in the lijnked issue), Conda (micromamba) seems to struggle with installing the language binaries, and they may be missing on some platforms.In that case, initializing a TextArea with a built-in language name will raise an
OSError
, which is not handled by the widget. I think it would be better to handle this error and re-raise as aSyntaxAwareDocumentError
, so the TextArea degrades instead of crashes.I'll be opening a PR with a simple fix for this shortly.
Full trace from the linked issue:
The text was updated successfully, but these errors were encountered: