是否可以为不同的 VS Code 终端配置文件使用不同的字体?

Is it possible to have different fonts for different VS Code terminal profiles?

在我的 mac 上,使用 ZSH 我需要使用字体 MesloLGS NF 才能看到我的一些主题图标,但是我的设置已同步到 VSCode 并且当我更改使用 terminal.integrated.fontFamily 命令在我的 settings.json 文件中添加字体,它也改变了我电脑上的字体,搞砸了我的 powershell 显示。

我尝试创建一个自定义配置文件,其中嵌套了设置,这样它只会在活动配置文件为 osx 时触发,但这不适用于配置文件内部或外部的代码范围括号:

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

这是我想要做的事情,所以字体可以在我的 PC 上的 powershell 中保持默认,但在我的 mac.

上使用 MesloLGS NF

有办法吗?

编辑:

我暂时找到了一个解决方法 - 在我的 mac 上使用专用的 settings.json 文件并添加 integrated.terminal.fontFamily 设置,并保留常规 settings.json 没有它,但是最好找到一种方法在每个平台上全局执行此操作。

扩展名 platform-settings 可能就是您要查找的内容

我将 settingsSync.ignoredSettings 用于类似的用例:

  1. 转到设置
  2. 搜索terminal.integrated.fontFamily
  3. 将鼠标悬停在 Terminal > Integrated: Font Family
  4. 点击出现的滚轮
  5. 取消选中 Sync This Setting

我还建议为 terminal.integrated.fontSize

禁用同步