visual-studio-code icon indicating copy to clipboard operation
visual-studio-code copied to clipboard

[Bug/Enhancement] No highlight when selecting snippet placeholder

Open imhuay opened this issue 2 months ago • 2 comments

Description
When using the Dracula theme in VS Code, snippet placeholders (e.g. $1) can be filled normally. However, when selecting the inserted text with Shift + ←/→, the selected part has no visual distinction from the surrounding text. It looks like the selection is not applied.

https://github.com/user-attachments/assets/23ff244a-0c91-47c0-bcc0-804c4ab54f1c

https://github.com/user-attachments/assets/d7ded54e-fcff-4d85-bdeb-2958c51fd28f

Steps to Reproduce

  1. Enable the Dracula theme in VS Code.
  2. Insert a user snippet containing a $1 placeholder.
  3. Type into the $1 position.
  4. Use Shift + ←/→ to select the text.
  5. Observe the selection effect.

Expected Behavior
The selected text should be visually highlighted and clearly distinguished from the surrounding text.

Actual Behavior
The selected text has no visible highlight, making it indistinguishable from unselected text.

imhuay avatar Nov 18 '25 05:11 imhuay

Thanks for the report @imhuay. If you can come up with a suggested solution to this in your user settings and chime back with an example of how that looks, that would be helpful.

dsifford avatar Nov 19 '25 16:11 dsifford

Thanks for the report @imhuay. If you can come up with a suggested solution to this in your user settings and chime back with an example of how that looks, that would be helpful.

Here is the configuration I tested, which helps mitigate the issue. You can take it as a reference:

"workbench.colorTheme": "Dracula Theme",
"workbench.colorCustomizations": {
    "[Dracula Theme]": {
        "editor.selectionBackground": "#838dca60",
        "editor.snippetTabstopHighlightBackground": "#ffffff00",   // Increase transparency
    }
},

https://github.com/user-attachments/assets/0ae4970b-4e8c-49ff-8e62-9c9eaf08b661

imhuay avatar Nov 19 '25 16:11 imhuay