Configure VSCode to show squiggles for specific level - visual-studio-code

In VSCode it is possible to filter warnings and errors by level via "Show Errors", "Show Warnings", "Show Infos" checkboxes. But those only affect the "Problems" panel.
Is there a way to similarly filter the squiggles that underline the source code that causes those warnings?
For example, I would like to see errors (= red squiggles) but not warnings or info-level hints (yellow and blue squiggles).
Ideally this would be a workspace-level configuration.
I expect this to be a language-agnostic feature, but I'm using Python with Pylint through Microsoft's extension.

Related

How to disable or make less visible the wavy underlines in VS Code? [duplicate]

I'm using Visual Studio Code (v1.11.2).
Is there any way to disable wavy underline at all?
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"
}
}
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.
VSC Version: 1.45.1
Solution: Disable "JavaScript ESLint Enable" 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 -> ESLint.
Click 'ESLint' and from right look for 'ESLint: Enable'.
Uncheck 'ESLint Enable'.
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.
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'.
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"
}
}
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
},
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.
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.
Disable wavy underline in VS Code in C on mac
Press command+shift+p (open command pallete)
Then type Disable Error Squiggles
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

What is the equivalent shortcut for CTRL+D ("add selection to next find match") of VSCode in CLion?

Usually in Visual Studio Code, if I want to delete or modify a certain word from my file, I can highlight one of the words and then continuously press CTRL+D to highlight the rest of that same word in the file. But, in CLion, I am unable to find the equivalent shortcut.
I've Googled and searched here on StackOverflow but no luck. Maybe this shortcut doesn't exist in CLion? Can anyone confirm?
EDIT: It's also known as "Select next occurence" in other JetBrains products.
EDIT: The answer is ALT+J
it is alt+j in all of jetbrains products
So I just want to hit on a couple of options that you have, because I work with both CLion & VSCode as well, and needed the same exact keybinding in CLion.
KEYBINDING FUNCTIONALITY SEMANTICS
Unfortunately, it appears that no one cares about standardizing semantics when it comes to editor functionality/features, and keybindings. It can make moving from one editor to the next difficult, and flat out something many people just would rather not have to do.
Please Note:
_I am no expert on JetBrains IDE's, I am somewhat of an expert with VSCode though. I say this because, IDK how much JetBrains IDE's vary from one to the next, however, from having CLion, IntelliJ, and Access to Ryder I can tell you that in the standard IDE's the keymappings seem near Identical, but in Ryder, the keybindings are totally different.
DEV ENVIRONMENT
BOUND-KEYS (dev env's default)
SEMANTICS
CLion
ALT+J
"Add Selection for Next Occurrence"
Visual Studio Code
CTRL+D
"editor.action.addSelectionToNextFindMatch"
Visual Studio 2022 (IDE)
SHIFT+ALT+.
"Edit.insertNextMatchingCaret"
the The correct semantics for referring to the functionality you seek in CLion is contingent on the environment that its being implemented in. The following demonstrates how to correctly reference it in both JetBrains & Visual Studio Environments:
Add Selection To Next Find Match Ctrl+D editor.action.addSelectionToNextFindMatch
Once you know the semantics of the functionality that you want to customize, you no longer have to resort to using any editors default key mapping. You asked about, CLion, so I will demonstrate, in an image (or screenshot) below, how you can change the keybinding to be anything you want it to be.
To get to the window you see in the photo navigate by following the steps below.
Starting from the text editor, find the word 'FILE' on the 'MENUBAR' located at the very top of your screen.
Click on 'FILE' to drop open the 'FILE MENU'.
Scan through the __FILE MENU'_s ITEMS, until you see the selectable ITEM named 'SETTINGS' (it will have a wrench icon next to it).
4 Select 'SETTINGS' by left-clicking it, and you'll open the 'SETTINGS MENU' open.
Another 'LIST' will appear on the left side. There will be 'BOLD ITEMS' and regular weighted SUB ITEMS. Find the 'BOLD ITEM' that reads 'KEYMAP'.
Select 'KEYMAP'.
The image above shows the view in my IDE of the keymap menu. You can see a red arrow, as well as a green arrow, in the image.
GREEN ARROW
The green arrow shows where you can change the entire Keymap, as you can see in the image, mine is set to VSCode, and as far as I can tell, every keybinding is the same as in VSCode. You do have to download the VSCode keymap plugin though.
RED ARROW
The red arrow shows where the "Bound Keys" are listed. Right click on the keybinding and you'll see a menu that reads
Add Mouse Shortcut
Add Keyboard Shortcut
Add Abbreviation
"it may also have options for removing keybindings and mouse shortcuts, it all depends on how the keybinding you click on is configured"
To set the keybinding select Add Keyboard shortcut, and set it to what ever you want.

Turn off all code analyzer warnings in the IDE

Is it possible to turn off all code analyzer warnings highlighting in the Matlab IDE, while keeping the code analyzer errors highlighting?
Looked around in preferences but didn't find any options except removing the underlining of warnings.
(They are still highlighted in code and visible at the right edge of the editor).
Workarounds I've found:
Disable all the warnings one by one, which is ridiculous because there is a list with hundreds of check boxes and no "un-check all".
Set the color of the warning highlighting to the background color of the editor.
You can use the search bar in the Code Analyzer tab in the Preference menu to filter only warnings. Then you can select them all with ctrl+A and right click and select 'Disable'.
Then you can save your new settings as a new mlint config file.

How do I disable brace highlighting in JetBrains RubyMine?

I want to disable brace contents highlighting in RubyMine. It's very distracting. Instead of having the entire string highlighted I only want the braces themselves highlighted and if that is not possible I need it disabled. Is this possible?
Things I've done already to no success:
Enabled/disabled all highlight options under Settings/General to no
effect. I'm running RubyMine v8.0.3.
Read the documentation.
jetbrains.com/idea/help/highlighting-braces.html?search=highlighting
I've also read this document that states how to disable highlighting
of usages by simply pressing escape - it does not work.
jetbrains.com/idea/help/highlighting-usages.html#3
current brace highlighting that I need disabled
Your file type seems to be HAML.
In Settings, go to Editor > Colors & Fonts > HAML. In the lower right area, you see demo code in HAML. Look for the right spot in the code and click on it.
You will probably click on the second line because there is some code in braces. In this case, RubyMine will select the entry Injected code in the list. The check box Use inherited attributes tells you that this settings is inherited.
Now you have to choose:
If you want to change the setting for Editor > Colors & Fonts > HAML - Injected code, switch off Use inherited settings, then switch off "Background".
If you want to the settings for injected code in all languages: Click on the link "General" (on the right). RubyMine will switch to Editor > Colors & Fonts > General - Injected language frament. Now switch off "Background"
Before modifing anything, you have to create a new scheme. The default scheme is read only. Click on Save As..., choose a name and press 'OK'.
Open the Settings/Preferences dialog.
In the Editor page of the IDE Settings, select the check box Highlight usages of element at caret to enable automatic usage highlighting.

How do I modify Darcula error highlights in IDEA?

I love the Moonrise UI theme for Eclipse. However I have grown less fond of Eclipse and am trying to switch to IDEA. One of the things I miss most though with the Moonrise theme is how nicely it highlights compile errors and warnings. It highlights the text background red and yellow respectively.
Errors and warnings in IDEA's Darcula theme, however, are not so obvious.
How do I modify the Editor pane colors in IDEA to format errors/warnings exactly like Eclipse Moonrise and highlight the background red/yellow?
Go to Settings/Editor/Colors and Fonts. If you haven't modified the theme before, save it first using Save As... button, because you can't modify the default one.
Then go to General and find Error and Warning items in the list. Uncheck the Error Stripe Mark and Effects checkboxes and check the Background checkbox. You can then select the color by clicking on the color selector next to the checkbox.
Screenshot: