0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Cursor(VsCode)のフォント「こいつ」の色を変更する。

Last updated at Posted at 2024-04-11

こいつの色を変えたいという時のやり方。例えばクラス、変数・・・

ctrl + shift + P
Developer: Inspect TM Scopesで検索

image.png

変えたいものをクリック

image.png

scopesを覚えておく

Settings.json

    "editor.semanticHighlighting.enabled": false,

他のテーマで上書きされないように設定
スコープと色を設定。

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "entity.name.type.cs", // C# のクラス名に使用されるスコープ
                    "source.cs",
                ],
                "settings": {
                    "foreground": "#0de2a2" // GameObjectで使われている色
                }
            },
        ]
    },

色の変更完了。やったね。

追記、私の設定を貼り付ける

    "editor.semanticHighlighting.enabled": false,

    "editor.tokenColorCustomizations": {
        "textMateRules": [
            {
                "scope": [
                    "entity.name.type.cs", // C# のクラス宣言
                ],
                "settings": {
                    "foreground": "#0de2a2" 
                }
            },
            {
                "scope": [
                    "entity.name.type.class.cs", // C# のクラス名に使用されるスコープ
                ],
                "settings": {
                    "foreground": "#1bfbf3" 
                }
            },
            {
                "scope": [
                    "variable.other.object.property.cs", // 変数
                    "entity.name.variable.local.cs", //ローカル変数
                    "punctuation.squarebracket.open.cs",
                    "variable.other.readwrite.cs", //メンバ 使用箇所
                    "variable.other.object.cs", //メンバ 引数
                    "entity.name.variable.parameter.cs",//関数引数
                ],
                "settings": {
                    "foreground": "#d4d4d4" 
                }
            },
            {
                "scope": [
                    "keyword.operator.logical.cs", // &&
                    "keyword.operator.arithmetic.cs", // + -
                    "keyword.operator.relational.cs",// <>
                    "keyword.operator.assignment.cs", //=
                    "keyword.operator.comparison.cs",// ==
                    "keyword.operator.increment.cs",// ++
                    "keyword.operator.conditional.question-mark.cs",// ?
                    "keyword.operator.conditional.colon.cs",// :
                ],
                "settings": {
                    "foreground": "#c694ff"
                }
            },
        ]
    },
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?