Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

List of missing scopes in comparison to language-babel #625

Open
@atomiks

Description

@atomiks

Prerequisites

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: '' } . In language-babel, it seems to use syntax--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 for console

  • 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 like this.func() instead of simply func()

  • I think the - in negative numbers should be part of the number scope, as in language-babel (doesn't really matter)

  • this is missing a scope: (tracked in Tree-sitter missing variable.language scope #618)

  • Bracket matcher doesn't match JSX tags, but it does in language-babel (tracked in separate repo)

Versions

1.32.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions