Reputation: 593
I am using Visual Studio Code to program in C++ but it keeps giving me error squiggles. I tried disabling them in the settings by changing C_Cpp error squiggles
to disabled
but they still appear. Is there anything else I need to do to disable them as I find them very annoying?
Upvotes: 13
Views: 32987
Reputation: 13620
Currently, there is no settings to turn the error decorations off but some language extensions implement their own solutions.
If you are looking for a language agnostic solution, you can make the squiggly lines transparent by adding following setting to general settings or workspace settings file.
"workbench.colorCustomizations": {
// ↓↓
"editorError.foreground": "#00000000"
}
For a specific language:
"workbench.colorCustomizations": {
"[jsonc]": {
// ↓↓
"editorError.foreground": "#00000000"
}
}
Please note that we use 8-digit hex value, the first six is not important but last two should be zero to make the color transparent.
Here is how you can do it programmatically in an extension:
workspace.getConfiguration('workbench').update( 'colorCustomizations', {
"editorError.foreground": "#00000000",
});
Upvotes: 7
Reputation: 31
just go to command palette (ctrl + shift + P) and then search C/C++ enable error squiggles and select that. Done
Upvotes: 3
Reputation: 12749
What you said you did works for me in VSCode 1.37.1.
Before, with defaults:
Changing the setting:
After:
Excerpt of settings.json
:
{
....
"C_Cpp.errorSquiggles": "Disabled"
}
There is another settings.json
attribute called C_Cpp.default.enableConfigurationSquiggles
. Might you have accidentally changed that one?
Is "C_Cpp: Intelli Sense Engine" set to "Default"? It should be (rather than "Tag Parser") in order to disable squiggles.
Maybe the syntax error you have is different somehow?
For ease of reproduction, it would help to see your settings.json
, c_cpp_properties.json
, and an example of erroneous syntax with squiggles.
Upvotes: 9