Skip to content

[themes] different themes for different filetypes #20652

Open

Description

Is it possible to have different themes for different filetypes?

Activity

  1. aeschli commented on Feb 20, 2017

    @aeschli
    Contributor

    Dariusz Żak (@darekzak) Please explain more... Is it about file icon themes or color themes?

  2. darekzak commented on Feb 20, 2017

    @darekzak
    Author

    I should gave more details, sry. I meant color theme.

  3. aeschli commented on Feb 20, 2017

    @aeschli
    Contributor

    Sorry, can you explain more? Still not clear how file types should correlate with color themes?
    Something like:

    {
        "*.java": "Monokai"
    }
  4. darekzak commented on Feb 20, 2017

    @darekzak
    Author

    Yes, exactly like that.

    {
      "*.js": "Monokai",
      "*.html": "Flatland Monokai"
    }
    
  5. aeschli commented on Feb 20, 2017

    @aeschli
    Contributor

    Ahh. But themes already theme more than just the editor. What would we do if two editors are open?

  6. added
    feature-request
    on Feb 20, 2017
  7. wopian commented on Mar 8, 2017

    @wopian

    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:

  8. tshu-w commented on Mar 16, 2017

    @tshu-w

    I have the same requirement like the questioner.
    Different themes for different languages in Visual Studio Code

  9. clembu commented on May 7, 2017

    @clembu

    What would we do if two editors are open?

    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.

  10. gordonbondon commented on May 29, 2017

    @gordonbondon

    One more reason to implement this is having different themes for code and documentation:
    light theme for *.md files
    dark for everything else

  11. 57 remaining items

  12. janosh commented on Feb 6, 2022

    @janosh

    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:

    Screen Shot 2022-02-06 at 14 41 28

  13. moseleyi commented on Mar 22, 2022

    @moseleyi

    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.

  14. evdcush commented on Nov 20, 2022

    @evdcush

    darekzak commented on Feb 15, 2017

    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):

    KN8ShFC

    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",
    }
    
  15. andrewdavidjamesburke commented on Dec 6, 2022

    @andrewdavidjamesburke

    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:

    {
        "label": "Some Dark Theme",
        "uiTheme": "vs-dark",
        "path": 
        [
            "./themes/dark.editortheme.json",
            "./themes/dark.cs.json",
            "./themes/dark.js.json",
            "./themes/dark.html.json",
        ]
    },
    

    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.

  16. ionut-botizan commented on Mar 24, 2023

    @ionut-botizan

    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

    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"
    			}
    		},
    	]
    	// ...
    }
    1. No highlight:
      Screenshot 2023-03-24 at 16 08 22

    2. Default highlight:
      Screenshot 2023-03-24 at 16 08 46

    3. Custom highlight:
      Screenshot 2023-03-24 at 16 09 07

  17. saltsoftdrink commented on Aug 17, 2023

    @saltsoftdrink

    Hey Guys work on this feature it's very useful & helpful

  18. chrisbward commented on Aug 18, 2023

    @chrisbward

    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/

  19. Saltallica commented on Nov 15, 2023

    @Saltallica

    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.

  20. stahl-patrick commented on Dec 8, 2023

    @stahl-patrick

    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.

  21. ZYinMD commented on Dec 8, 2023

    @ZYinMD

    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.

  22. Harr-Fun-Maula commented on Mar 5, 2024

    @Harr-Fun-Maula

    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,
    }

  23. liranc6 commented on Oct 3, 2024

    @liranc6

    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

  24. smturro2 commented on Mar 19, 2025

    @smturro2

    Year 8

    Year 8. Classic Microsoft

  25. RobinMeow commented on May 18, 2025

    @RobinMeow

    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

  26. md2perpe commented on Mar 26, 2026

    @md2perpe
    Contributor

    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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestthemes

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions