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
A long time ago we briefly had the option for language defaults of the script/style tags, but it turned out to be a nightmare:
VS Code's (and other IDE's) syntax highlighting isn't equipped to dynamically switch to a different highlighter depending on some default written into some config file which is read at runtime. You would have a subpar experience, and we would have to do horrible hacks to get it even remotely working
Many intellisense features are based on the file ending (for example within the TypeScript service), messing with file endings meaning different things is bad. This is no different for file contents
TypeScript needs synchronous code paths. Writing stuff in config files that cannot be synchronously read (like svelte.config.js) would mean that we have to jump through hoops to first load all config files, then load the TypeScript service
It's harder to reason about what you can write into a script/style tag by default, as it can differ between projects
For these reasons that option was quickly removed, and we don't intend to add it back - therefore closing.
Description
In VS Code, you can set up associations of extensions and language identifiers.
https://code.visualstudio.com/docs/languages/identifiers
And for example, if I have such settings
it is necessary that
<style>
by default are highlighted and processed by plugins that processpostcss
files as if it were<style lang="postcss">
.Proposed solution
You can use the VS Code settings, you can add an option to the plugin settings.
See also sveltejs/svelte#9752.
Alternatives
No response
Additional Information, eg. Screenshots
Is it even necessary?
The text was updated successfully, but these errors were encountered: