vincaslt / vscode-highlight-matching-tag

Highlights matching opening or closing tag in VSCode
https://marketplace.visualstudio.com/items?itemName=vincaslt.highlight-matching-tag
MIT License
159 stars 16 forks source link

Selected word breaking #116

Closed ronilaukkarinen closed 4 years ago

ronilaukkarinen commented 4 years ago

Is there a way to prevent this?

Screenshot

vincaslt commented 4 years ago

Maybe, could you post your extension settings json?

ronilaukkarinen commented 4 years ago

My settings.json is pretty large so here's only the relevant parts:

  "editor.renderLineHighlight": "none",
  "highlight-matching-tag.styles": {
    "opening": {
      "full": {
        "surround": "#bd93f9",
      },
      "left": {
        "surround": "#bd93f9",
      },
      "right": {
        "surround": "#bd93f9",
      },    
      "closing": {
        "surround": "#bd93f9",
      },    
    },
  },

It does the same with any settings be it underline, full etc.

vincaslt commented 4 years ago

Well, your settings works fine for me: image

Also:

"closing": {
  "surround": "#bd93f9",
},

is incorrect, as closing style should not be part of opening tag styles, but it is simply ignored. If you don't provide closing at all, the same one is used as for opening, otherwise it should be:

  "highlight-matching-tag.styles": {
    "opening": {
      "full": {
        "surround": "#bd93f9"
      },
      "left": {
        "surround": "#bd93f9"
      },
      "right": {
        "surround": "#bd93f9"
      }
    },
    "closing": {
      "full": {
        "surround": "#bd93f9"
      }
    }
  }

Anyway, it seems like it's some problem with either another extension or other vscode settings. It could also be that the specific code that you're trying to highlight somehow breaks highlighting, which is possible, I could check if you could share it somehow.

ronilaukkarinen commented 4 years ago

Very strange. Disabled all plugins and only enabled this one, and still getting this, when clicking on tag:

Screenshot

My full settings.json file is here.

ronilaukkarinen commented 4 years ago

I fixed this by adding "editor.selectionHighlightBackground": "#2b303c00", (0% opacity) for selected word.