-
Notifications
You must be signed in to change notification settings - Fork 112
Feature request: Custom language #187
Description
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
- eslint has the option "eslint.validate"
- prettier had "prettier.javascriptEnable", but they remove it in the last version Feature request: re-add the ability to specify a custom language prettier/prettier-vscode#270
- 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