You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Gert Cuykens, Troy Gerwien, Anders Elfgren, Pine, Yukai Huang, Brad Gashler, Faisal Hakim, The web walker, Raul Santos, Jonathan Ray and 6 more
The tsserver supports embedded js (and ts for this matter). VSCode will need to extract the script tag contents, and send them to the server. all other LS operations should work regularly from this point on. No work on the tsserver-side should be needed, so microsoft/TypeScript#11739 should be closed, and this issue reopened (unless there is another issue tracking this work on the vscode side).
It is worth noting that this is hte same support that VS 2015 uses to drive intellisense and other Language Service features in empeded JS code in script tags.
No, it's currently not on the plan. We first want to see how much the demand for more support for JavaScript inside HTML is. Please file issues or vote (add thumbs ups) on existing ones.
Reacted by Johannes Drechsler, jaa1982, Etienne Rocheleau and Arc41t3ct
So, going over the various threads regarding <script ...> /* can we have syntax highlighting and autocomplete here please */ </script>, I see several issues, same requests, then why moving from one language service might have broken the feature (I assumed it was there), then what it might take to get it done (maybe), finally how this is a duplicate and now issue needs to be merged [rinse repeat ...]
As an observer, who has been waiting for the feature but decided to observe, I think we need a better mechanism to communicate! I really do appreciate how much effort is involved to manage all those threads in a consistent manner, and let's not forget having to actually work on the project. So, maybe if we can think of a better system around unique features (and maybe sub-features or preferences) and have one place for people to vote.
My opinion: this [reliable editing of scripts in tags, like scripts in files, and enough contextual awareness of the fact that the script is in this particular HTML] is important and there is enough justification to give it some importance.
Thanks!
Reacted by Hsiao-Chieh Tsai, Pierre MARTIN, LH0702, hansgunnar, toso06, Johannes Drechsler, Alejo Berardino, jbailey2954, eikichiP, David Choo and 8 more
Activity
gertcuykens commentedon Nov 12, 2016
And typescript :D #14032 see comment
bgashler1 commentedon Nov 19, 2016
This would be great. I currently can only get intelliSense in my JS files—but not in HTML files with script tags.
s130059660 commentedon Nov 20, 2016
I'm using the latest insider 1.8 builds.
Now, native js autocomplete works. However, imported modules don't.
waderyan commentedon Nov 21, 2016
Note - duplicate issue here #3465
User feedback in comments.
aeschli commentedon Nov 23, 2016
Added single file support for JavaScript in HTML (no script includes are followed).
JeremyBYU commentedon Feb 9, 2017
Is there a plan to allow intellisense for imported variables in <script> tags inside html files?
aeschli commentedon Feb 9, 2017
No, it's currently not on the plan. We first want to see how much the demand for more support for JavaScript inside HTML is. Please file issues or vote (add thumbs ups) on existing ones.
SMotaal commentedon Feb 16, 2017
So, going over the various threads regarding
<script ...> /* can we have syntax highlighting and autocomplete here please */ </script>, I see several issues, same requests, then why moving from one language service might have broken the feature (I assumed it was there), then what it might take to get it done (maybe), finally how this is a duplicate and now issue needs to be merged [rinse repeat ...]As an observer, who has been waiting for the feature but decided to observe, I think we need a better mechanism to communicate! I really do appreciate how much effort is involved to manage all those threads in a consistent manner, and let's not forget having to actually work on the project. So, maybe if we can think of a better system around unique features (and maybe sub-features or preferences) and have one place for people to vote.
My opinion: this [reliable editing of scripts in tags, like scripts in files, and enough contextual awareness of the fact that the script is in this particular HTML] is important and there is enough justification to give it some importance.
Thanks!
arc41t3ct commentedon Jul 24, 2017
when opening the script tags with
<script type="text/javascript">intellisense works inside html files.