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

Feature request: Custom language #187

@ericm546

Description

@ericm546

I'm wondering if it would make sense for this extension to register itself as a new language in vs code.

It could include the babel grammar from https://github.com/gandm/language-babel and support all the flow syntax.

I've been working for a couple of month with an extension that define it as a new language and it's a trade off, but I like it better.

Plus

  • It's faster as the javascript vscode engine is not running in the background.
  • the completion is not polluted with vscode fuzzy completion
  • there is no popup showing 2 times the same definition when doing a go to definition
  • you don't have to disable the javascript.validate.enable option

Minus

  • Other extensions binded on the javascript language have to know about the new language or offer an option to specify a custom language
  • Some builtin vscode javascript features are helpful like the import file completion, but they could always be re-implemented in the extension.

Another option could be to create an second extension that define a language javascriptflow and have this extension support "javascript", "javascriptreact" and "javascriptflow"

What do you think?

I modified this extension to add a new language here, if anybody want to test: https://github.com/ericm546/flow-for-vscode/blob/master/flow-for-vscode-new-language-0.0.1.vsix

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions