-->

Подчеркивание ошибок vs code

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

Trimsky

@Trimsky

Все люди уникальны. Ты — один из всех

Случайно нажал на кнопку отключить волнистые линии для ошибок. Теперь не могу вернуть.
Подскажите как теперь снова включить подсветку?

Язык C++.


  • Вопрос задан

    более двух лет назад

  • 3732 просмотра

File -> Preferences -> Settings -> Workspase
в строке поиска : C_Cpp.errorSquiggles
выбрать Enabled

6092c9ad96df2020619565.png

Пригласить эксперта


  • Показать ещё
    Загружается…

25 июн. 2023, в 15:07

15000 руб./за проект

25 июн. 2023, в 14:57

10000 руб./за проект

25 июн. 2023, в 13:53

2000 руб./за проект

Минуточку внимания

Your privacy

By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

I’m using Visual Studio Code (v1.11.2).
Is there any way to disable wavy underline at all?

enter image description here

asked Apr 17, 2017 at 16:01

Legotin's user avatar

2

To disable wavy/squiggly underline in vscode, go to preferences 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"
    }
}

pppery's user avatar

pppery

3,70021 gold badges32 silver badges45 bronze badges

answered Feb 4, 2018 at 16:57

Dmitry Demidovsky's user avatar

0

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.

warning message VScode

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
VSCode settings.json
There are also options to disable validating HTML and JavaScript code.

answered Apr 18, 2017 at 8:19

Abdullah Leghari's user avatar

Abdullah LeghariAbdullah Leghari

2,3023 gold badges24 silver badges40 bronze badges

4

VSC Version: 1.45.1

Solution: Disable «JavaScript ESLint Enable» for JavaScript files.

  1. Open Command Palette by ‘Ctrl+Shift+P’.
  2. From Command Palette find and click: ‘Preferences: Open Workspace Settings’.
  3. From ‘Workspace Settings’ into search field type ‘javascript’. From left sidebar look for Extensions -> ESLint.
  4. Click ‘ESLint’ and from right look for ‘ESLint: Enable’.
  5. Uncheck ‘ESLint Enable’.

enter image description here

answered Jun 4, 2020 at 18:32

Yao Li's user avatar

Yao LiYao Li

2,0531 gold badge25 silver badges24 bronze badges

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.

answered Oct 12, 2021 at 4:55

Matthias Fripp's user avatar

Matthias FrippMatthias Fripp

17.6k5 gold badges27 silver badges45 bronze badges

1

Scenario: VScode 1.35.1 with installed extension «StandardJS — JavaScript Standard Style«.

  1. The extension in javascript files: underlines some code, checks for indent spaces, etc.

  2. How to stop javascript code style validation ?

Solution: Disable «JavaScript Standard Style» for JavaScript files.

  1. Open Command Palette by ‘Ctrl+Shift+P’.

  2. From Command Palette find and click: ‘Preferences: Open Workspace Settings’.

  3. From ‘Workspace Settings‘ into search field type ‘javascript‘. From left sidebar look for Extensions -> JavaScript Standard Style.

  4. Click ‘JavaScript Standard Style’ and from right look for ‘Standard: Enable‘.

  5. Uncheck ‘Standard Enable’.

answered Jun 18, 2019 at 11:01

Ted's user avatar

TedTed

84310 silver badges13 bronze badges

with the extension When File you can make the squiggles transparent when the file is dirty.

Add this to your settings.json file (global or workspace/folder)

"whenFile.change": {
  "whenDirty": {
    "editorError.foreground": "#ff000020",
    "editorWarning.foreground": "#ff000020",
    "editorInfo.foreground": "#ff000020"
  }
}

answered Jan 9 at 15:24

rioV8's user avatar

rioV8rioV8

23.7k3 gold badges30 silver badges46 bronze badges

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
    },

answered Nov 9, 2021 at 19:52

Fed's user avatar

FedFed

1,65622 silver badges29 bronze badges

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.

ouflak's user avatar

ouflak

2,44810 gold badges44 silver badges49 bronze badges

answered Mar 5, 2022 at 15:13

Naveen Saini's user avatar

For Python, using VS Code circa v1.78.2, this worked:

  • Navigate to Extensions
  • Find Pylint, click the gear icon and select Disable
  • Find Pylance, click the gear icon and select Disable
  • Restart of VS Code was required and disabling both Pylint and Pylance was required

answered May 18 at 14:27

rob_7cc's user avatar

rob_7ccrob_7cc

7876 silver badges16 bronze badges

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.

answered Dec 11, 2020 at 4:25

Aamir Naved's user avatar

1

Disable wavy underline in VS Code in C on mac

  1. Press command+shift+p (open command pallete)
  2. Then type Disable Error Squiggles
  3. And click on that Disable Error Squiggles

Your squiggles are no more

If you want to restart squiggles for some reason
then in command pallete type Enable Error Squiggles

answered Nov 19, 2020 at 15:36

Mayur Gupta's user avatar

Mayur GuptaMayur Gupta

3032 silver badges14 bronze badges

1

@alexdima
these are mine settings

{
  "breadcrumbs.filePath": "off",
  "breadcrumbs.symbolPath": "off",
  "editor.acceptSuggestionOnEnter": "smart",
  "editor.colorDecorators": false,
  "editor.cursorBlinking": "smooth",
  "editor.cursorStyle": "line-thin",
  "editor.detectIndentation": false,
  "editor.fontSize": 12,
  "editor.hover.enabled": false,
  "editor.minimap.renderCharacters": false,
  "editor.multiCursorModifier": "ctrlCmd",
  "editor.scrollBeyondLastLine": false,
  "editor.snippetSuggestions": "top",
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": false,
  "files.exclude": {
    "**/.git": true,
    "**/.svn": true,
    "**/.hg": true,
    "**/CVS": true,
    "**/.DS_Store": true,
    "**/node_modules": true,
  },
  "files.insertFinalNewline": true,
  "files.trimFinalNewlines": true,
  "files.trimTrailingWhitespace": true,
  "html.format.wrapAttributes": "force-expand-multiline",
  "window.closeWhenEmpty": true,
  "window.restoreFullscreen": true,
  "window.titleBarStyle": "custom",
  "workbench.commandPalette.history": 0,
  "workbench.editor.tabSizing": "shrink",
  "workbench.settings.editor": "json",
  "workbench.settings.useSplitJSON": true,
  "workbench.startupEditor": "newUntitledFile",
  "[javascript]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[html]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[javascriptreact]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "javascript.updateImportsOnFileMove.enabled": "always",
  "breadcrumbs.enabled": false,
  "editor.renderControlCharacters": false,
  "editor.renderWhitespace": "none",
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode"
  },
  "[typescript]": {
    "editor.defaultFormatter": "vscode.typescript-language-features"
  },
  "diffEditor.renderSideBySide": true,
  "javascript.validate.enable": false,
  "search.searchOnTypeDebouncePeriod": 500,
  "git.openDiffOnClick": false,
  "workbench.colorTheme": "GitHub Dark",
  "svg.preview.mode": "svg",
  "editor.codeActionsOnSave": {
      "source.fixAll.eslint": true
  }
}

I haven’t touched them since the last update and highlighting stopped working.
--user-data-dir with this highlighting works. soo, should I delete my settings and start over?

Возможно, вам также будет интересно:

  • Подходя к озеру чувствуешь приятную прохладу грамматическая ошибка
  • Подходя к лесу мне стало холодно ошибка
  • Подходя к дому у меня выпал зонт исправить ошибку
  • Подушка srs volvo ошибка
  • Подтягивания широким хватом ошибки

  • Понравилась статья? Поделить с друзьями:
    0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии