michaelgmcd / vscode-language-babel

VSCode syntax highlighting for today's JavaScript
https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
MIT License
131 stars 17 forks source link

Please don't use the "javascript" machine name #40

Closed Anoesj closed 5 years ago

Anoesj commented 5 years ago

Thanks for making this extension. I don't like constantly having to switch between turning this extension on and off. Can't you not replace/override the built-in javascript formatter?

michaelgmcd commented 5 years ago

What is the reason for constantly having to switch this extension on and off?

Anoesj commented 5 years ago

When viewing HTML files with the Babel JavaScript extension enabled, syntax highlighting goes wrong, so I disable the extension again to view the HTML without syntax highlighting bugs.

I can also imagine that people might want to use this extension only on files ending on .mjs. Using a different machine name than "javascript" makes it possible for people to use this extension only on .mjs files.

What's the reason you want to override "javascript"? Doesn't "babeljavascript" make more sense anyway?

michaelgmcd commented 5 years ago

There are several reasons for overriding the javascript machine name. The intent of this plugin is to entirely replace the default JavaScript plugin, which I have encountered several issues with. For things like inline JS in HTML or Markdown (which I'm working on fixing right now) and anywhere else that relies on JS, it makes sense for this plugin to take over highlighting. Simpler installation is another bonus. If you have any other issues where you need to disable this plugin, please let me know. See #33 for tracking the JS in HTML issue.