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
{{ message }}
Repository navigation
[themes] different themes for different filetypes #20652
Is it possible to have different themes for different filetypes?
Reacted by Brian Sipple, Daniel Liljeström, Jonathan Kosgei, Kale Blankenship, AB, Luke Camilleri, Artem Yarmoliuk, James Harris, Cameron, Peal Wang and 293 more
Reacted by Jens Hausdorf and d3lay
Reacted by Ewerton Ferreira, Al Mahdi, Kostiantyn Perun, Ian Izaguirre, Vikram Kumar, alex2awesome, Sai Rohitth Chiluka and Tyler C Laprade, CFA
Reacted by Ewerton Ferreira, Dasu Pradyumna, Kostiantyn Perun, Ian Izaguirre, vxna, maf, Vikram Kumar, alex2awesome, Sai Rohitth Chiluka, Tristan Guichaoua and 1 more
Sorry, can you explain more? Still not clear how file types should correlate with color themes?
Something like:
{
"*.java": "Monokai"
}
Reacted by Yann Papouin, iqhater, darkpoetcc, Robert Martin, Matthias Thar, Michael Liquori, Boris Rorsvort, Aaron Connolly, Anwar Hossain, Adrien Becchis and 13 more
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.
My thoughts go to a differentiation between themes specified for a language and "the theme of the workspace".
If two editors are open, they apply whatever theme matches the language found. The rest of the UI uses only the "main theme".
Agreed, it would slow down editor loading time a tad more.
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.
Reacted by Cameron, Geoff Vallis, Rian Neogi, Adonis Kakoulidis, monk-8bit, Palmi Moller, youlam, Miroslav Gula, Ghost4Man, Nato Boram and 4 more
One more reason to implement this is having different themes for code and documentation:
light theme for *.md files
dark for everything else
Reacted by James Harris, James C, Siddharth Sharma, Charles Roper, Ashkan Shirpour, Sean Poulter, Juan Alvarado, iqhater, Danilo Vega, Lucas Lemonnier and 96 more
Reacted by Jacob McDowell, iqhater, Wayne Ashley Berry, Ben Pinzone, Qi, Aiden Gardner, Shiqi Mei, Paul Harvey, Nick Coughlin, Simon Wiles and 7 more
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 .md file dark themed on the left and its preview light themed on the right (to look more like a normal document). Useful e.g. to properly view plots with transparent background:
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 "color_scheme" defined on each syntax here (markdown: bijan, java: hotdogstand, python: monokai):
You too can get that java theme simply by specifying in your java.sublime-settings:
// These settings override both User and Default settings for the Java syntax
{
"color_scheme": "Packages/Colorsublime - Themes/HotDogStand.tmTheme",
}
Reacted by Matthias Thar, Andrew David James Burke, Den Sand, toknpp, stahl-patrick, The Matthew Effect and JurekSeverin
This is a somewhat necessary feature.
For both the OP's reason and for general organization when using the same editor theme with multiple syntax themes for various languages.
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.
The most common example in the past few years would be the CSS in JS syntax highlight, in which a different theme for the CSS code written as
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
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.
Main reason is the above mentioned differences between the themes depending on the language.
I work daily in terraform, yaml, python, markdown, sql and in multiple random languages like go, javascript etc.
I haven't found a single theme to be great for all of the languages. There's always one language that isn't formatted as well as in some other theme. However there's a great theme for any single language mentioned.
I'd also love to have this feature. Main reason is the above mentioned differences between the themes depending on the language. I work daily in terraform, yaml, python, markdown, sql and in multiple random languages like go, javascript etc. I haven't found a single theme to be great for all of the languages. There's always one language that isn't formatted as well as in some other theme. However there's a great theme for any single language mentioned.
If you haven't, at least give each project a different theme using .vscode/settings.json.
Actually it would be better if we can set "themes" based on "file name" rather than extension.
Different color for Split window.
for example
"[_Model.js]" : {
tab.background:red,
}
"[_Viewl.js]" : {
tab.background:green,
}
Another year has gone...
I'm starting to think Microsoft is not going to solve it.
I totally agree with Dariusz Żak (@darekzak) 's excellent example:
{
".js": "Monokai",
".html": "Flatland Monokai"
}
And Janosh Riebesell (@janosh) makes a great point about wanting a different color theme for the markdown preview window. A dark theme on the left and a light one on the right would really make it feel more like a normal document.
It would be really great to set a theme, based on files types. And the theme _(or should I say syntax highlighting + background?) _ should only apply to the files.
The vscode theme itself should be decoupeled, so you could choose dark, light or custom themes w/e.
Files should use the vscode theme as a fallback, if it has no defined theme for its filetype (or plain text display, if no theme configured)
I often have, typescript files open next to html files or scss files.
And since I do full stack, I often do stuff in C# as well.
next up are configurations files, like yml, json (I mean thats just javascript but, well..).
dotfiles are a different matter, but not really important to me, since I dont spend alot of time in those e.g. .gitignore, or .editorconfig, .env, ... you get the idea
Of course the list only becomes longer, if you add shell/bash files and razor files etc..
Nevertheless, I dont think the disply of a file tab, should be strongly coupled to the vscode window.
And even better it would be, if I could quickly switch between two themes (for a specificy file type) using the cmd palette.
For example, consider im working alone, I prefer the Visual Studio Dark Theme für C#, but when pair-programming I might prefer to use a Riders-similar theme, to make it easier for the navigator.
currently im using visual studio for c# development, and otherwise vscode.
But I often run in the issue of pressing short cuts for Visual Studio in vscode, and vice versa.
For example, renaming a variable in Visual Studio, would close the vscode editor.
Or creating a multi line cursor in Visual Studio would duplicate the line in vscode.
Among many other, issues that comes with using more then on IDE, while trying to use default configurtaions, so you can stay flexible on the machines you are working it
Perhaps one could have a stack of themes, where, for example, one affects the workbench look, another affects TypeScript and JavaScript code coloring, and a third addresses Python code coloring?
Activity
aeschli commentedon Feb 20, 2017
Dariusz Żak (@darekzak) Please explain more... Is it about file icon themes or color themes?
darekzak commentedon Feb 20, 2017
I should gave more details, sry. I meant color theme.
aeschli commentedon Feb 20, 2017
Sorry, can you explain more? Still not clear how file types should correlate with color themes?
Something like:
{ "*.java": "Monokai" }darekzak commentedon Feb 20, 2017
Yes, exactly like that.
aeschli commentedon Feb 20, 2017
Ahh. But themes already theme more than just the editor. What would we do if two editors are open?
wopian commentedon Mar 8, 2017
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.
Example:

tshu-w commentedon Mar 16, 2017
I have the same requirement like the questioner.
Different themes for different languages in Visual Studio Code
clembu commentedon May 7, 2017
My thoughts go to a differentiation between themes specified for a language and "the theme of the workspace".
If two editors are open, they apply whatever theme matches the language found. The rest of the UI uses only the "main theme".
Agreed, it would slow down editor loading time a tad more.
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.
gordonbondon commentedon May 29, 2017
One more reason to implement this is having different themes for code and documentation:
light theme for *.md files
dark for everything else
57 remaining items
janosh commentedon Feb 6, 2022
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
.mdfile dark themed on the left and its preview light themed on the right (to look more like a normal document). Useful e.g. to properly view plots with transparent background:moseleyi commentedon Mar 22, 2022
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.
evdcush commentedon Nov 20, 2022
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
"color_scheme"defined on each syntax here (markdown:bijan, java:hotdogstand, python:monokai):You too can get that java theme simply by specifying in your
java.sublime-settings:andrewdavidjamesburke commentedon Dec 6, 2022
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.
For both the OP's reason and for general organization when using the same editor theme with multiple syntax themes for various languages.
ionut-botizan commentedon Mar 24, 2023
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.
The most common example in the past few years would be the CSS in JS syntax highlight, in which a different theme for the CSS code written as
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
No highlight:

Default highlight:

Custom highlight:

saltsoftdrink commentedon Aug 17, 2023
Hey Guys work on this feature it's very useful & helpful
chrisbward commentedon Aug 18, 2023
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/
Saltallica commentedon Nov 15, 2023
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.
stahl-patrick commentedon Dec 8, 2023
I'd also love to have this feature.
Main reason is the above mentioned differences between the themes depending on the language.
I work daily in terraform, yaml, python, markdown, sql and in multiple random languages like go, javascript etc.
I haven't found a single theme to be great for all of the languages. There's always one language that isn't formatted as well as in some other theme. However there's a great theme for any single language mentioned.
ZYinMD commentedon Dec 8, 2023
If you haven't, at least give each project a different theme using
.vscode/settings.json.Harr-Fun-Maula commentedon Mar 5, 2024
Actually it would be better if we can set "themes" based on "file name" rather than extension.
Different color for Split window.
for example
"[_Model.js]" : {
tab.background:red,
}
"[_Viewl.js]" : {
tab.background:green,
}
"[*_Controller.js]" : {
tab.background:yellow,
}
liranc6 commentedon Oct 3, 2024
Another year has gone...
I'm starting to think Microsoft is not going to solve it.
I totally agree with Dariusz Żak (@darekzak) 's excellent example:
{
".js": "Monokai",
".html": "Flatland Monokai"
}
And Janosh Riebesell (@janosh) makes a great point about wanting a different color theme for the markdown preview window. A dark theme on the left and a light one on the right would really make it feel more like a normal document.
The Theme War: Microsoft’s Achilles' Heel
smturro2 commentedon Mar 19, 2025
Year 8. Classic Microsoft
RobinMeow commentedon May 18, 2025
It would be really great to set a theme, based on files types. And the theme _(or should I say syntax highlighting + background?) _ should only apply to the files.
The vscode theme itself should be decoupeled, so you could choose dark, light or custom themes w/e.
Files should use the vscode theme as a fallback, if it has no defined theme for its filetype (or plain text display, if no theme configured)
I often have, typescript files open next to html files or scss files.
And since I do full stack, I often do stuff in C# as well.
next up are configurations files, like yml, json (I mean thats just javascript but, well..).
dotfiles are a different matter, but not really important to me, since I dont spend alot of time in those e.g. .gitignore, or .editorconfig, .env, ... you get the idea
Of course the list only becomes longer, if you add shell/bash files and razor files etc..
Nevertheless, I dont think the disply of a file tab, should be strongly coupled to the vscode window.
And even better it would be, if I could quickly switch between two themes (for a specificy file type) using the cmd palette.
For example, consider im working alone, I prefer the Visual Studio Dark Theme für C#, but when pair-programming I might prefer to use a Riders-similar theme, to make it easier for the navigator.
currently im using visual studio for c# development, and otherwise vscode.
But I often run in the issue of pressing short cuts for Visual Studio in vscode, and vice versa.
For example, renaming a variable in Visual Studio, would close the vscode editor.
Or creating a multi line cursor in Visual Studio would duplicate the line in vscode.
Among many other, issues that comes with using more then on IDE, while trying to use default configurtaions, so you can stay flexible on the machines you are working it
md2perpe commentedon Mar 26, 2026
Perhaps one could have a stack of themes, where, for example, one affects the workbench look, another affects TypeScript and JavaScript code coloring, and a third addresses Python code coloring?