11

How do I get rid of this underline? When I hover over it, it thinks it's a link and that I can cmd + click it to open it in browser. However, it's obstructing the view of actual underlines.

I'm specifically using Go's templating engine and vscode's basic HTML syntax because it's not supported.

enter image description here

5
  • Does it also do that outside of the href attribute of the a tag? It seems a setting in your IDE for anchor tags. Commented Dec 1, 2016 at 19:15
  • @BartFriederichs Nope, you can see the {{ .Title }} from the above image. Commented Dec 1, 2016 at 19:17
  • Refer to the vscode manual then to find where this setting is set. Commented Dec 1, 2016 at 19:22
  • @BartFriederichs I actually looked around before asking this question, including the settings file. To make sure, I browsed again but no luck. Commented Dec 1, 2016 at 23:53
  • They would have implemented it but because less than 20 people voted for it, they didn't. github.com/microsoft/vscode/issues/140657 Pretty stupid policy to hold a vote for 60 days on a feature request as how would all the interested people in the world know that a vote is taking place right now and they now have to vote for it? Commented Apr 12, 2022 at 14:23

3 Answers 3

14

I think I found a solution for your problem. Add this code to your User Settings;

"editor.links": false 
Sign up to request clarification or add additional context in comments.

4 Comments

I'd like to keep links clickable and just get rid of the underlines. Is it possible?
wondering the same, @Betty :(
@katerlouis I later found a way. See my answer.
User asked for getting rid of the underline, not about getting rid of the link.
4

If you want to keep links clickable and just get rid of the underlines, I found a way:

open resources\app\out\vs\workbench\workbench.desktop.main.css

search for .monaco-editor .detected-link, and delete it.

Reopen VSCode, it will show some warning. Allow it and it's done.

After every update, you'll need to edit this file again.

2 Comments

Is monaco the theme? Do you know where this css file is for other themes like Material Theme on macOS?
@katerlouis I think Monaco is the editor that powers VS Code under the hood. (microsoft.github.io/monaco-editor) This method works regardless of the theme for me on Windows. I don't own a Mac but I guess it's the same, since VSC is based on Electron.
0

Today my search for link underline results as below snapshot

So link-underline could be controled in the workbench when the checkbox checked

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.