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
This is probably useful for more than just Atom, so I'm raising it here.
To allow packages to take advantage of these grammars, it would help a lot to have a standardised list of common nodes and their expected range.
E.g., most languages have strings, so the standard might be something like
string: $=>seq('"',<stuff>, '"') // from tree-sitter-javascript
This would allow the toggle-quotes package to reliably find strings in any language, without needing to add a bunch of cases for all the possible node names.
OK. That example was a bit weak. But the idea is pretty much to have a similar set of guidelines the TextMate language docs provide. Even referencing that guide directly should be enough to keep community grammars from branching out on their own unique styles and conventions.
The text was updated successfully, but these errors were encountered:
This would allow the toggle-quotes package to reliably find strings in any language, without needing to add a bunch of cases for all the possible node names.
OK. That example was a bit weak.
No, I actually think that's a pretty good example! I haven't really thought about this much recently, but you're probably right; if we spent a bit more effort standardizing them, it could make the trees more useful overall.
This is probably useful for more than just Atom, so I'm raising it here.
To allow packages to take advantage of these grammars, it would help a lot to have a standardised list of common nodes and their expected range.
E.g., most languages have strings, so the standard might be something like
This would allow the
toggle-quotes
package to reliably find strings in any language, without needing to add a bunch of cases for all the possible node names.OK. That example was a bit weak. But the idea is pretty much to have a similar set of guidelines the TextMate language docs provide. Even referencing that guide directly should be enough to keep community grammars from branching out on their own unique styles and conventions.
The text was updated successfully, but these errors were encountered: