facebookarchive / ide-flowtype

Flow support for Atom IDE
Other
178 stars 17 forks source link

Seems to break autocomplete in <script> tags #32

Open jacobmischka opened 6 years ago

jacobmischka commented 6 years ago

It seems like default autocompletion is broken in <script> tags with ide-flowtype enabled. It looks like it's disabling the default one and replacing it even for non-flow js files, which is fine, but it would be great if it either did the same with <script> tags or if it just allowed the default one to continue to work there. I've experienced this issue in both .html files and .vue files.

peek 2017-09-25 14-02

Thanks for all the great work!

jacobmischka commented 6 years ago

It actually does more than disable the default provider, it seems to be breaking all providers.

Adding source.js.embedded.html to the grammar scopes for ide-flowtype doesn't seem to have any effect. Maybe this is an upstream issue in atom-languageclient?

jacobmischka commented 6 years ago

In case anyone else runs into this, removing source.js from enhancedScopes in package.json and from getGrammarScopes in main.js seems to work around this issue for now if you have language-babel installed.

language-babel will add source.js.jsx to js files, so they'll still be parsed by ide-flowtype, but the embedded js in html files will be left alone.

jacobmischka commented 6 years ago

Just to keep up this up to date, I am still experiencing this in the latest version, and I'm still using my workaround above in the meantime.