This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Loading grammar with highlights throws missing scopeName property error #106
Comments
Tracking in atom/atom#16581. |
Actually that is related but not quite the same. |
Do have any thoughts on the two potential fixes I suggested @50Wliu? |
I will defer to @maxbrunsfeld who is working on tree-sitter. |
@maxbrunsfeld Any thoughts on this? This bug is currently breaking our REPL for: https://markojs.com/try-online/ |
Ping @maxbrunsfeld @50Wliu following up with this issue since there is still no consensus. Thoughts on my suggested fixes? #106 (comment) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
We are using the
language-javascript
package (along with several others) in combination with highlights to syntax highlight a REPL on a webpage. It seems that sometime recently new grammar files were added without ascopeName
property (e.g. https://github.com/atom/language-javascript/blob/master/grammars/tree-sitter-javascript.cson) and instead are usinglegacyScopeName
. This is causing an error to be thrown fromfirst-mate
as it is expecting ascopeName
property. I'm not sure what the right solution is to this. We could either:scopeName
property to each of the grammar files that is missing itlegacyScopeName
in this moduleI'm leaning towards 2 as the better solution, but I'm not really sure why
legacyScopeName
was introduced in the first place. I would be happy to work on this and submit a PR given proper feedback on the above information.Case:
Throws the following error:
/cc @50Wliu @maxbrunsfeld
The text was updated successfully, but these errors were encountered: