Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code highlighting in Peek Definition window of Visual Studio Code

I have a problem about code highlighting in Peek Definition window of Visual Studio Code.

When I peek any function or class code with Peek Definition, the entire code block, not only the function or class name, will be highlighted with bright orange background, so that it's hard to read the code for me.

I attached a sample image of the situation.

I'll appreciate your help.

An example of the highlighted code

like image 782
kttn Avatar asked Feb 22 '18 12:02

kttn


People also ask

What is Visual Studio code syntax highlighting?

Syntax highlighting determines the color and style of source code displayed in the Visual Studio Code editor. It is responsible for colorizing keywords like if or for in JavaScript differently than strings and comments and variable names.

How do you highlight highlighted words in VS Code?

Ctrl+D selects the word at the cursor, or the next occurrence of the current selection. Tip: You can also add more cursors with Ctrl+Shift+L, which will add a selection at each occurrence of the current selected text.

How do I get rid of highlighting VS Code?

You can turn off code coverage highlighting by navigating to your code coverage results and toggling the “Show code coverage coloring” icon.


1 Answers

Since no one officially answered your question, I figured I'll just post the solution (thanks @Alex for the hint!):

  1. Open the settings menu
    • On Windows/Linux - File > Preferences > Settings
    • On macOS - Code > Preferences > Settings
  2. Search for Color Customizations and click on Edit in settings.json
  3. Insert your custom highlighting (peekViewEditor.matchHighlightBackground) in the right window:
"workbench.colorCustomizations": {
    "[*Your Theme*]": {
        "peekViewEditor.matchHighlightBackground": "*Your Chosen Color*"
    }
}

screenshot

If you'd like to make other changes to the peek editor, take a look at the official documentation.

like image 50
gottlike Avatar answered Jan 03 '23 12:01

gottlike