Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vscode needs to support html/js/css mixed mode #134419

Closed
evolve2k opened this issue Oct 5, 2021 · 3 comments
Closed

vscode needs to support html/js/css mixed mode #134419

evolve2k opened this issue Oct 5, 2021 · 3 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@evolve2k
Copy link

evolve2k commented Oct 5, 2021

For frontend development I often need embed html inside JS files, or vice verse, etc, i.e. the mixed code snippet mode. vscode really should be able to detect these html/js segments instead of just depending on a simple file type, and then apply intellisense and indentation to these segments.

now, if I embed script into html, or put some html into javascript, all the vscode smartness are lost for those embedded code.

Reopening #41066

@rmunn
Copy link
Contributor

rmunn commented Oct 5, 2021

If I'm reading #1751 (comment) correctly, the VS Code developers would prefer that bugs like this be filed in the repo(s) of the relevant language service(s), e.g.:

@aeschli
Copy link
Contributor

aeschli commented Oct 15, 2021

https://github.com/microsoft/vscode is the correct repo for the HTML, CSS and TypeScript extensions.

Can you give a concrete example? Add a code snippet, what the file name is and what language mode the editor shows (on the toolbar).

The HTML language extension has support for embedded CSS and JavaScript. So that should all work, as long as you are editing a HTML file and your editor mode is 'HTML'. Note that there are HTML like languages that don't have script/style support, so please check the language mode in the status bar, and also try with extensions disabled.

The TypeScript language extension has support for JSX tags.

@aeschli aeschli added the info-needed Issue requires more information from poster label Oct 15, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants
@rmunn @evolve2k @roblourens @aeschli and others