Yashwin Munsadwala
Yashwin Munsadwala

Reputation: 514

Bracket highlighter for commented code in VScode

Trying to find a way to highlight parentheses for commented code. I have been using Bracket Pair Colorizer 2 in VScode and don't see an option for it. Please refer line #20 in the below screenshot for more clarity. enter image description here

Upvotes: 0

Views: 653

Answers (1)

Mark
Mark

Reputation: 180805

Try this setting with the Highlight extension:

 "highlight.regexes": {
    "(.*//[^[]*?)(\\[)([^\\]]*?)(])": [
      {}, 
      { "color": "white" },
      {},
      { "color": "white" }
    ]
  },

or

  "highlight.regexes": {
  
    "(.*//[^\\[]+?)(\\[)([^\\]]+?)(\\])(.*)": {
      "filterLanguageRegex": "javascript",
      "decorations": [
        {}, 
        { "color": "white" },
        {},
        { "color": "white" },
        {}
      ]
    }
  },

Upvotes: 1

Related Questions