4
5

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 3 years have passed since last update.

vscodeでコメントの色をいい感じにする

Last updated at Posted at 2020-08-20

#はじめに
最近色々とコメントを書くことが増えてきてvscodeでうまくできないかなーと調べてやってみたら意外と簡単に設定ができたので共有いたします。簡単にしか説明してませんがおそらく大丈夫だと思います。。

導入方法

下記の二つをインストールしてください。

その後にこちらの設定をvscodeのsettings.jsonに追記してください。

settings.json
  "todo-tree.general.tags": [
    "CHANGED",
    "FIXME",
    "NOTE",
    "REVIEW",
    "TODO",
    "WARNING",
  ],
  "todo-tree.highlights.defaultHighlight": {
    "icon": "checklist",
    "type": "text",
    "fontWeight": "bold",
    "iconColour": "#2C7CFF",
  },
  "todo-tree.highlights.customHighlight": {
    "CHANGED": {
      "foreground": "#FF00FF",
    },
    "FIXME": {
      "foreground": "green",
    },
    "NOTE": {
      "foreground": "#C0C0C0",
    },
    "REVIEW": {
      "foreground": "#2C7CFF",
    },
    "TODO": {
      "foreground": "#FF5F17",
    },
    "WARNING": {
      "foreground": "red",
    },
  },
  "better-comments.tags": [
    {
      "tag": "CHANGED",
      "strikethrough": false,
      "backgroundColor": "transparent",
      "color": "#FF00FF",
    },
    {
      "tag": "FIXME",
      "strikethrough": false,
      "backgroundColor": "transparent",
      "color": "green",
    },
    {
      "tag": "NOTE",
      "strikethrough": false,
      "backgroundColor": "transparent",
      "color": "#C0C0C0",
    },
    {
      "tag": "REVIEW",
      "strikethrough": false,
      "backgroundColor": "transparent",
      "color": "#2C7CFF",
    },
    {
      "tag": "TODO",
      "strikethrough": false,
      "backgroundColor": "transparent",
      "color": "#FF5F17",
    },
    {
      "tag": "WARNING",
      "strikethrough": false,
      "backgroundColor": "transparent",
      "color": "red",
    },
  ]

✳️  最後にvscodeを再起動しないとBetter Commentsの設定が反映されませんのでご注意ください・

これで以上です。笑 おそらくこんな感じでできるはずです。

スクリーンショット 2020-08-20 16.57.08.png

最後に

今回の設定では最低限の設定しかしてませんし色もお好みのものでないかもしれません。
詳しくは各ドキュメントを参考にしてください!

参考記事

4
5
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
4
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?