Reputation: 2688
I'm using Visual Studio Code (v1.11.2).
Is there any way to disable wavy underline at all?
Upvotes: 85
Views: 161468
Reputation: 181050
There is a new setting in Insiders v1.85 to hide the Problems squigglies in the editors and the editor tabs and the Explorer (see demo below).
The setting is:
Problems: Visibility
Controls whether the problems are visible throughout the editor and workbench.
Unfortunately, it is a setting only and not a command that can TOGGLE the problems visibility on and off quickly.
If you want to be able to quickly toggle it on and off by a keybinding, you will need an extension such as Toggle, written by a then-vscode team member - there may be other toggle settings extensions.
Here is a keybinding (in your keybindings.json
) that will toggle the Problems: Visibility
setting on and off:
{
"key": "alt+t", // whatever keybinding you want
"command": "toggle",
"when": "editorTextFocus",
"args": {
"id": "problems",
"value": [
{
"problems.visibility": false
},
{
"problems.visibility": true
}
]
}
}
Demo showing the setting working:
Demo of the Toggle keybinding:
When the Problems: Visibility
setting is off, there will be a small notification in the Taskbar which when clicked will take you to the Setting UI with that setting:
The Toggle
extension keybinding will also cause this taskBar notification to appear.
Previous answer:
A suggestion to upvote this more recent GH Issue: Provide the ability to disable warning/error squiggles. It is a backlog candidate but needs votes so that disabling the squigglies can be done across languages without resorting to the transparent trick.
Also definitely upvote Toggle problem visibility in Editor: same issue, already on the Backlog.
Upvotes: 6
Reputation: 8197
To disable wavy/squiggly underline in vscode, go to settings.json (Ctrl + Shift + P to access the Command Palette and type “settings.json”) and set underline color to fully transparent:
{
"workbench.colorCustomizations": {
"editorError.foreground": "#00000000",
"editorWarning.foreground": "#00000000",
"editorInfo.foreground": "#00000000"
}
}
Though it may be better to make underline color just less vibrant:
{
"workbench.colorCustomizations": {
"editorError.foreground": "#ff000088",
"editorWarning.foreground": "#ffe60033",
"editorInfo.foreground": "#00ff0088"
}
}
Upvotes: 153
Reputation: 917
For Python, using VS Code circa v1.78.2, this worked:
Upvotes: 0
Reputation: 31
If in dart in the flutter project, blue wavy lines are coming all over the code in the dart file, then make sure that you have saved the file with a name that contains lowercase and underscore characters only.
Upvotes: 0
Reputation: 1875
If you are using Ruby
and those are the files that you want to disable the warnings for, open the preferences file settings.json
and modify the ruby linting rules as follows:
"ruby.lint":
{
"rubocop": false
},
Upvotes: 0
Reputation: 18625
When using Python, the common advice is to use shift-ctrl/cmd-P, then set Python: Enable/Disable Linting
> Disable
and Python: Select Linter
> Disable Linting
. Neither of those was enough for me. Nor was I able to disable these by turning off the dozen or so linters listed under Settings
> search > linting
.
However, I was finally able to disable the wavy red underlines via Settings
> Python: Language Server
> None
.
By the way, you can see where these underlines are coming from via View
> Problems
. In my case, they were coming from PyLance, and after I removed that extension, they came from Jedi instead. Even though I don't have the Jedi installed. It seems like Microsoft's own Python extension has Jedi somewhere inside and uses that unless you turn off the Language Server entirely.
Upvotes: 4
Reputation: 129
Right Click in your editor window and select for 'Command Pallet' option
OR press CTRL+SHIFT+P and search for the option 'Enable Error Squiggle' and just click on it. That's it! If you want to Disable Red Wavy underlines showed after syntax error, just Follow the above procedure and search for 'Disable Error Squiggle' and click on it.
Upvotes: -2
Reputation: 519
Disable wavy underline in VS Code in C on mac
Your squiggles are no more
If you want to restart squiggles for some reason then in command pallete type Enable Error Squiggles
Upvotes: -6
Reputation: 2276
VSC Version: 1.45.1
Solution: Disable "JavaScript ESLint Enable" for JavaScript files.
Upvotes: 3
Reputation: 923
Scenario: VScode 1.35.1 with installed extension "StandardJS - JavaScript Standard Style".
The extension in javascript files: underlines some code, checks for indent spaces, etc.
How to stop javascript code style validation ?
Solution: Disable "JavaScript Standard Style" for JavaScript files.
Open Command Palette by 'Ctrl+Shift+P'.
From Command Palette find and click: 'Preferences: Open Workspace Settings'.
From 'Workspace Settings' into search field type 'javascript'. From left sidebar look for Extensions -> JavaScript Standard Style.
Click 'JavaScript Standard Style' and from right look for 'Standard: Enable'.
Uncheck 'Standard Enable'.
Upvotes: 1
Reputation: 2470
In VSCode, those green squiggly lines mean a warning in your code. VSCode performs background code analysis(Linting) in order to provide you feedback about syntax and compilation errors.
In your particular case it is caused because of an empty CSS ruleset (declaring a selector but no properties). You can see the warning message by hovering mouse pointer over code with the green squiggly line underneath.
You can disable the wavyline by disabling linting for CSS.
Go to File --> Preferences --> Settings and then place following line in Settings.json
"css.validate": false
Alternatively you can also change default behavior of empty ruleset which is "css.lint.emptyRules": "warning" to ignore
There are also options to disable validating HTML and JavaScript code.
Upvotes: 12