Home > Software design >  Is it possible to have different fonts for different VS Code terminal profiles?
Is it possible to have different fonts for different VS Code terminal profiles?

Time:10-26

On my mac, using ZSH I need to use the font MesloLGS NF in order to see some of my theme icons, however I have my settings synced in VSCode and when I change the font in my settings.json file using terminal.integrated.fontFamily command, it changes the font on my PC as well, screwing up my powershell display.

I have tried creating a custom profile with the setting nested within in it so that it is only triggered when the active profile is osx, but that doesn't work with the code inside or outside the profile scope brackets:

    "terminal.integrated.defaultProfile.osx": "my zsh",
    "terminal.integrated.profiles.osx": {
        "my zsh": {
            "path": "zsh",
            "terminal.integrated.fontFamily": "MesloLGS NF"    \\ doesn't work here 
        },
        "terminal.integrated.fontFamily": "MesloLGS NF"    \\ or here
    },

This is the sort of thing I want to do, so the font can remain default in powershell on my PC, but take on MesloLGS NF on my mac.

Is there a way to do this?

Edit:

I've found a workaround for the time being - using a dedicated settings.json file on my mac with the added integrated.terminal.fontFamily setting, and left the general settings.json without it, however it would be nice to find a way to do this globally for each platform.

CodePudding user response:

I used settingsSync.ignoredSettings for my similar use case:

  1. Go to Settings
  2. Search terminal.integrated.fontFamily
  3. Hover over Terminal > Integrated: Font Family
  4. Click the wheel that appears
  5. Uncheck Sync This Setting

I recommend also disabling sync for terminal.integrated.fontSize

CodePudding user response:

The extension platform-settings is maybe what you look for

  • Related