-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
[themes] different themes for different filetypes #20652
Comments
@darekzak Please explain more... Is it about file icon themes or color themes? |
I should gave more details, sry. I meant color theme. |
Sorry, can you explain more? Still not clear how file types should correlate with color themes? {
"*.java": "Monokai"
} |
Yes, exactly like that.
|
Ahh. But themes already theme more than just the editor. What would we do if two editors are open? |
For me, this would remove the manual action of constantly changing colour theme when working on a specific set of languages (mainly AGC) in chrislgarry/Apollo-11 or virtualagc/virtualagc, then switching back to my dark theme when working on anything else. As due to the archived printouts being printed with black text on white, its far easier to compare the transcribed code in VS Code with the images and spot typos when they're a similar colour - instead of contrasting. |
I have the same requirement like the questioner. |
My thoughts go to a differentiation between themes specified for a language and "the theme of the workspace". A second option is to go the atom way and separate UI themes from Syntax themes, but I'm not much more convinced by this. |
One more reason to implement this is having different themes for code and documentation: |
Theming per file type (file extension, etc.) is highly desirable. Notepad++, Sublime Text have it, vsCode should have this too. I have a sample tmTheme file I use for Sublime Text if anyone is interested in making it work with vsCode. |
+1 for this, my current use case is to have a specific theme when opening markdown files, for the rest of lenguages I must admit I use the same theme |
I have to agree with the requestor -- I am used to editing languages more in specific color schemes from my previous IDEs (STS [Eclipse-based]) vs Atom & Brackets vs Visual Studio vs various Json/XML editors/parsers. This would be very useful, IMO. |
I'm keen for this as well. Ideally I could override any setting when i'm editing a specific language. I like to totally change up my config when editing LaTex files, i.e. Serif font, larger font size, light color theme, different 'files.exclude' different settings for some other extensions i've got and more. Supporing more than just the 'editor.*' settings would be great :D |
As others have said, this is an extremely versatile feature that is hard to articulate how useful it is. It is something I sorely miss from Sublime Text. |
I wrote a Conditional Color Scheme plugin for Sublime Text, and am currently considering making VS Code my primary editor. I'm still working through the default settings & keymap to see what's available, so I haven't had a chance to check out the API yet. Does VS Code have something similar to Sublime Text's view.settings().set("color_scheme", "__new_color_scheme_name__") ? |
+1 |
@Enteleform Yes, extensions can change the current theme through the settings. |
@aeschli |
Our token theming engine currently only supports one theme a time. The code would have to be refactored. |
@aeschli Than how would I change the theme with extension? any direction? |
This issue shouldn't be closed because the @jsaulou extension does not solve the original problem. Some filetypes as |
I think you are right, but does that really matters at the end when coding? I am using jsaulou's extension and I only notice it sometimes as a programmer |
For anybody who's still following this issue: I now use different You could try adding something like this to your settings.json and see how to works: "[plaintext]": {
"editor.fontFamily": "sans-serif",
"editor.fontSize": 22.3,
"editor.lineHeight": 34,
},
"[markdown]": {
"editor.fontFamily": "serif",
"editor.fontSize": 19,
"editor.lineHeight": 25
}, |
I could add the possibility to associate a theme using either extension or language. Would this help? |
Yes, that would be awesome! |
I would like to create a theme for files ending in I have a nice theme I use for Is this possible? |
I'm sorry but the extension Theme by language is absolutely not a fix for this issue as it changes the theme of the entire editor. For those of us who use several panels (I'm guessing most) this is slow and bad |
A similar feature (which likely doesn't deserve its own issue considering that #28483 was closed with reference to here but which should be kept in mind when this is implemented) is the ability to set a different color theme for the markdown preview window. For example have the |
I would also like such feature. For 75% of my files I have an Egoist One theme slightly tweaked using settings. But for specific file type (*.lookml) I want to install an extension that has tokens colours. However we have to specify a theme in the extension, which means it changes my whole editor. |
This feature request was initially opened in Feb 2017, with lots of closed duplicate issues and references from other issues, and consistent comments and demand until today here. What's the status on this feature request? Is this feature on the vsc roadmap? This inability to select per-syntax/filetype themes is one of major remaining shortcomings in vscode that keeps my development workflow split between different editors. Some themes just have better syntax support for certain languages over others, and some languages just look better in other themes. It would be ideal if vscode could have "syntax-specific" settings like Sublime Text does. For example, I have a different You too can get that java theme simply by specifying in your
|
I think time is up on this one Microsoft :) This is a relatively easy implement 5 years in the request queue. What we need is something like this:
This is a somewhat necessary feature. |
I'm a bit surprised that in 7 years, nobody mentioned the situation in which the per language theme would probably make the greatest difference and that is embedded languages. export const button = css`
border-radius: 4px;
font-size: 14px;
` would make it easier to differentiate between the two. One example from a project I currently work on are Neo4J Cypher query strings. To make it easier to differentiate the queries from the surrounding code I had to manually apply different colors from the Twilight theme to the Cypher language tokens when the default theme was Monokai, as it has already been suggested in other posts here. However, doing that for multiple languages and keeping the settings in sync with the original theme the tokens were taken from is very cumbersome. Note in the examples below how in the first screenshot the query has no specific highlight other than the default Monokai color for Typescript strings, then, in the second, highlight is enabled by an extension that tokenizes the string, but it's still pretty hard to follow as the Cypher tokens use the same colors as the Typescript tokens while in the last one the distinction between the two languages is clearly visible as Cypher uses a completely different color scheme than the surrounding Typescript code, which were applied through custom settings, like so {
// ...
"[Monokai]": {
"textMateRules": [
{
"name": "Cypher QL keywords",
"scope": "keyword.control.clause.cypher",
"settings": {
"fontStyle": "bold",
"foreground": "#82563D"
}
},
{
"name": "Cypher QL keywords",
"scope": "source.cypher support.function",
"settings": {
"foreground": "#F9EE98"
}
},
]
// ...
} |
Hey Guys work on this feature it's very useful & helpful |
Would like to change the theme or colours for a specific file, to work as an ambient signifier for the particular domain I'm working within - more info on UX design of ambient signifiers here; https://boxesandarrows.com/ambient-signifiers/ |
Holy **** its been years. For the love of all that is holy, please allow different color backgrounds or syntax highlighting per editor window based on language. |
I'd also love to have this feature. |
If you haven't, at least give each project a different theme using |
Actually it would be better if we can set "themes" based on "file name" rather than extension. "[*_Controller.js]" : { |
Another year has gone... I totally agree with @darekzak 's excellent example: The Theme War: Microsoft’s Achilles' Heel |
I was also trying to do something like @darekzak was mentionning, but stumbled here and realized it's not a built-in feature...im surprised |
Is it possible to have different themes for different filetypes?
The text was updated successfully, but these errors were encountered: