Skip to content

Instantly share code, notes, and snippets.

@ComradeCat24
Created January 4, 2022 09:07
Show Gist options
  • Save ComradeCat24/ffb1933edfe4f54c09cd69fa1f3b4ada to your computer and use it in GitHub Desktop.
Save ComradeCat24/ffb1933edfe4f54c09cd69fa1f3b4ada to your computer and use it in GitHub Desktop.
vscode tips

Editor TokenColorCustomizations

Also see Editor.TokenColorCustomizations

Also see VSC highlight and comment colors

You can set the following:

  • comments
  • functions
  • keywords
  • numbers
  • strings
  • types
  • variables

If you use any of these, you'll change all comments, functions, etc. to the color you set.

If you want to be more specific, you can set ANY scope you want in the textMateRules section. This, too, is shown in the release notes.

The styling schema is as follows:

  • foreground (color)
  • background (color)
  • fontStyle (One or a combination of: italic, bold, underline)
tokenColorizationSettingSchema = {
  type: "object",
  properties: {
    foreground: {
      type: "string",
      format: "color"
    },
    background: {
      type: "string",
      format: "color"
    },
    fontStyle: {
      type: "string",
      description: nls.localize(
        "schema.fontStyle",
        "Font style of the rule: One or a combination of 'italic', 'bold' and 'underline'"
      )
    }
  }
};
@ComradeCat24
Copy link
Author

HOLY FUCK

{
  "editor.tokenColorCustomizations": {
    "[Dark++ Italic]": {
      "textMateRules": [
        {
          "name": "LigsArrow",
          "scope": [
            "keyword.operator.comparison",
            "meta.block",
            "meta.arrow",
            "meta.var.expr",
            "source"
          ],
          "settings": {
            "foreground": "#FF0000",
            "fontFamily": "Fira Code"
          }
        }
      ]
    }
  }
}

You can use any font for that interval!!!!!!!!!!!!!!!!!

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