Enable autocomplete for both HTML and JavaScript in the same file in Atom editor?

1

When I use Atom editor and write a small script inside an .html file I don't get autocomplete the way I do in a .js file, due to the language of the file being set to HTML. When I switch it to JavaScript I get exactly what I want, but the HTML autocomplete and highlighting don't work (for obvious reasons). Is there a way to enable this feature or download a third-party package to fix it.

P.S. If not, I can always write the JS in an external file, but I'd rather have the script and html in the same file.

boyski33

Posted 2016-11-13T12:26:43.637

Reputation: 11

OK, I changed the language of the file to JavaScript and then back to HTML and it somehow got fixed, now I have autocomplete for both JS and HTML, even though the language of the file is set to HTML. Weird.... – boyski33 – 2016-11-13T12:30:33.180

No answers