Closed timonson closed 4 years ago
That's very interesting. I can totally reproduce it. For some reason, the javascript syntax kind of doubles-up in a weird way on the curly braces in the jsdocs.
I think this is because vim-html-template-literals causes syntax/javascript.vim
to get sourced twice. Vim sources it naturally the first time (because you opened a js file), and then vim-html-template-literals sources syntax/html.vim
which internally sources syntax/javascript.vim
again, since html can contain javascript. I had incorrectly assumed that this was harmless.
This should be fixed now on the dev
branch.
Hi @jonsmithers, in some cases the plugin doesn't reset the highlighting, it seems. For example in the following code, the function declaration is highlighted incorrectly.
When I disable the plugin, it works correctly again. I have noticed similar effects at some other occasions, as well. On one accasion I had a file where I put a template literal at the top and the rest of the javascript code was incorrectly highlighted after that. If you want me to give you any more information, please let me know.