List of missing scopes in comparison to language-babel #625
Description
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Comparing the new language-javascript
using tree-sitter grammar and language-babel
using the old system, I'm noticing many missing features, to the point where I can't use it yet but would like to. I hope that this list will help you improve the current highlighting.
-
✅ Missing function parameters scope. However in
language-babel
arrow functions whose parameters spread multiple lines don't get highlighted (nor the function name) -
✅ Object property access
obj.property
is not differentiated from declaration, i.e.obj = { property: '' }
. Inlanguage-babel
, it seems to usesyntax--unquoted
for the object property. -
✅ Missing
jsx.component
to style components differently from classes -
✅ Add a spread-syntax scope. I like to enbolden and add a shadow to that specific operator
-
✅ Missing a dom syntax scope, i.e. for
window
,document
,navigator
, etc, and a console scope forconsole
-
const func = () => {}
- the function name is not scoped as a function. -
The class properties proposal (arrow functions in classes) are not scoped as functions, e.g.
class Example {
notScopedAsFunction = () => {}
scopedAsFunction() {}
}
-
Missing a
method
scope if a function was called on an object likethis.func()
instead of simplyfunc()
-
I think the(doesn't really matter)-
in negative numbers should be part of the number scope, as inlanguage-babel
-
(tracked in Tree-sitter missing variable.language scope #618)this
is missing a scope: -
Bracket matcher doesn't match JSX tags, but it does in(tracked in separate repo)language-babel
Versions
1.32.2