Search code examples
visual-studio-codecomments

Disable strike through comment


In vscode when commenting a block that already contains other comments will display the inner comments as strike-through lines, also grayed out.

I'm not sure if this was an option or a plugin I've installed or a native behavior, but I couldn't find a way to disable this behavior.

Example

/* function helloFn() {
  // this is a comment within my function
  return "Hello"
} */

enter image description here

The inner comment will be displayed as // this is a comment within my function.

This is true whether I use an outer comment block or a line by line comment.
As soon there is a comment within a comment it will trigger this behavior.

Q: How to disable this?


Solution

  • Thanks to Mark's comment I've used Help: Start Extension Bisect and found out it was caused by the Better Comments extension.

    In particular this part of the settings:

      {
        "tag": "//",
        "color": "#474747",
        "strikethrough": true,
        "underline": false,
        "backgroundColor": "transparent",
        "bold": false,
        "italic": false
      },
    

    By changing "strikethrough": false solved the problem