How do I remove these annoying error labels? - visual-studio

VS 2022
How do I get rid of these annoying error popups while I'm typing? They even appear over the text I'm currently typing sometimes.
I'm not exactly sure when it started, I may have accidentally turned on an option by mistake, but I don't remember which option controls this.

Tools > Options > Text Editor > C# (for example) > Advanced > Display diagnostics inline (uncheck)

Related

Intellisense window is way too small

For some reason, I got this very tiny Intellisense window. It's so tiny that I can't get any help from what type a certain property needs, etc. Any way to solve this problem?
You can try to re-initialize the autocomplete suggestion to fix the window's dimensions issue:
Un-check XCode > Preferences > Text Editing > Editing > Suggest completions while typing
Restart XCode
Enable Suggest completions while typing

How to turn off auto indent in Visual Studio 2019? (not VISUAL STUDIO CODE)

I usually use comma , to set the same variable type like the gif above.
But a problem is when I hit Enter after write second variable, the VS breaks the line automatically.
As a formal Atom user, it's a bit tedious because in Atom it doesn't break the line whatever the indent number is. (My current indent number is 2.)
I changed and tested it all of the options inTools > Options > Text Editor > Basic > Tabs, but none of these turn off the breaking line. Even disabling pretty listening won't work.
How do I turn off this feature?
Judging by the glimpse of Intellisense and the fact that Enter auto-formats, it looks like you're editing a JavaScript file.
To disable auto-formatting after hitting Enter, go to Tools > Options > Text Editor > JavaScript/TypeScript > Formatting > General and toggle Format completed line on Enter to unchecked:
The accepted answer doesn't work in Visual Studio 2019 with Visual Basic. These options on the image aren't even shown in the Options for Basic.
However, when the Pretty listing option is turned off, this behavior ceases.

How to automatically place XAML attributes on next line?

Visual Studio (for Mac) used to place XAML attributes on the next line when auto-formatting, but ever since a recent update (not sure which one), it now places them all on one line when auto-formatting, which is super annoying because I much prefer the previous way. I can't seem to figure out how to change it back. I did not touch any settings at all, and I can't seem to find any settings that will fix this for me.
I have looked at Microsoft's Docs, which shows a setting that looks like it would solve this issue for me:
Position each attribute on a separate line
Each attribute occupies its own line, which is useful when many attributes are present.
XAML
<Button
Height="23"
Name="button1"
Width="75">Hello</Button>
The issue with this is that I cannot find this setting. The page says to go to Tools > Options > Text Editor > XAML > Formatting, but I do not see Options under Tools, which lead me to another page that says to go to Preference > Text Editor > Behavior, but neither this tab nor its child XAML has any settings that would put attributes on the next line.
If anyone knows how to solve this issue, it would be much appreciated. I would prefer a solution that would allow me to customize how the auto-formatting (control + i) works rather than downloading an extension where I need to use a console command.
Thanks!
If anyone stumbles upon this having the same issue, I finally figured it out from poking around some more in the settings.
Go to Preferences > Source Code > Code Formatting > XML document > XML Format and then check the 'Attributes on new line' box.
Go to Tools➝ Options ➝ Text Editor ➝ XAML ➝ Formatting ➝ Spacing.
Then in the "Attribute Spacing" group, choose "Position each attribute on a separate line."
If you want the first attribute to start from the next line, uncheck the "Position first attribute on same line as start tag" checkbox.
Note: this approach is validated on Visual Studio 2019.
For more information, check the official documentation.

How to turn on matching braces VS 2017

I just installed VS 2017 but I can't seem to get matching braces turned on. I tried changing colors in the tools editor but that didn't work. Not sure what I did to turn this off.
OK, for some reason its only for JavaScript files. If this happens to you, go to Tools > Options > Text Editor > JavaScript/TypeScript > Language Service and uncheck the Enable the new JavaScript language service. If you have any JavaScript files open at the time you do this, you will need to close and then reopen them.

Turn Off XAML error underlining

This is a simple issue, and I hope someone can help
For reasons I don't think I need to explain, my XAML thinks it has some errors in it in the Visual Studio code editor (which shows as wavy blue underlines across most of my XAML).
Does anyone know how to turn this underlining off in Visual Studio 2012 ?
It's incredibly annoying, and makes my XAML hard to read
Thanks
I would suggest setting the editor for .xaml-files manually.
Go into
Tools->Options->Text Editor->File Extension
Write xaml in the Extension field and choose XML (Text) Editor from the Editor drop down and then click Add.
Your XAML files should now open as ordinary XML files, without error underlining.
You will probably loose a lot of the nice to have features of the XAML editor, but as far as I know (I've struggled a bit with this myself) it is the only way.
Found this on MSDN. There is a specific setting to disable this.
Open the Options dialog by selecting Tools > Options, and then select
Text Editor > XAML > Miscellaneous.
Uncheck the Show errors detected
by the XAML designer check box.
Article from MSDN
It is possible to hide the SquiggleShape by making the surrounding adornment layer hidden or collapsed using the Snoop tool.
To achieve this, the Snoop crosshair tool has to be dragged on the editor window with shift and ctrl keys pressed (keep them pressed a while when releasing mouse button). You should end on some Canvas (with the editor window highlighted), and below there is some ViewStack. Inside, there are some AdornmentLayer, one of which contains multiple SquiggleShape. In the properties section on the right side of the Snoop window, scroll to the Visibility row and select the value Hidden or Collapsed. Now, the squiggle lines are not visible any more.
This involves some manual work, but as long as the file stays open, the squiggle lines are hidden. In principle, it should be possible to write an extension which hides the lines automatically. However, at the moment I don't find the time to do this...
The only decent fix for this silly bug that I can find is right click on the xaml and click open with. Select source code editor (without with encoding). Not a great fix when you consider it gets rid of important errors. But it should help you read it better for the most part.
Another Option for this is to change the color of the line under: Tools > Options > Environment > Fonts and Colors. Change it to the same as the background.
It will turn it off in all other editors also though.

Resources