How to disable Peek problem in VS Code on a MAC? - macos

I'm not sure how I got this, maybe via some extension that was installed on my VS Code, but I need to disable this.

There is currently no setting to disable/hide these "squiggly lines". VS Code indicates them as errors or "Problems" with your code, and it's always recommended to address the problems rather than to hide them.
But there are workarounds.
Change the color
You can customize the color to make it transparent:
"workbench.colorCustomizations": {
"editorError.foreground": "#00000000",
}
You can also customize it so that it looks like the editor background.
"workbench.colorCustomizations": {
"editor.background": "#282a36",
"editorError.foreground": "#282a36",
}
If you are using a theme, you can get the theme's current value for editor.background by opening the command palette, then selecting "Developer: Generate Color Theme from Current Settings", which will open a JSON file containing all the theme colors. Look for editor.background.
You could also set it to something that isn't as striking as bright red.
Note that this way just hides the "squiggly lines". The errors will still show up in the Problems panel and when you hover your mouse over the line.
Disable Python linting
For Python, if you look at the Problems tab, the error is actually raised by the Python Linters that come with VS Code and the Python extension. In my case, I'm using pylint.
You could disable these linters by calling the Python: Enable Linting command command and setting it to off, or by putting this in your settings.json:
"python.linting.enabled": false,
Note that this way not just hides the red squiggly lines, but stops linting altogether, so you also won't see anything in the Problems panel.
This is harmful to the development process as it stops checking for "syntactical and stylistic problems in your Python source code, which oftentimes helps you identify and correct subtle programming errors or unconventional coding practices that can lead to errors.".
I don't recommend doing this.

Related

VSCode setting or extension for SCSS to autoformat brackets and place cursor

I recently changed my VSCode settings to stop suggestions and someone disabled a setting for SCSS files, where I could type
.example {}
hit return and this would automatically change to
.example {
//cursor positioned here
}
I cannot figure out how to restore this setting, losing my mind trying to find extensions or suggestions. Please help!
Specifically about your question
As mentioned in the comments by #Brad, it may be related to settings. However, the disabled setting may be in your settings.json file, which can have configuration not seen in the settings editor.
The easiest way to get to it is by using the command palette. The shortcut is cmd+p on a mac or ctrl+p in windows, and you can search for settings:
in the settings.json file, you can have language-specific settings. Look for something tied to scss, which would have brackets around it. My guess is that you may have one or more of these commands set to false:
You may also need to check your workspace settings as well, because they can have settings active for a single folder. Using the command-palette again, you can find it by typing "workspace"
A more general suggestion
I would recommend against turning off such a broad feature as code suggestions. They can be very helpful, and although this is a personal choice, learning to use them to your advantage can be highly productive in VS Code. One of the perhaps underused features of vscode is the ability to have custom snippets for any given language.
In order to achieve the behavior described in your answer, for example, I would configure a snippet like this:
"StackOverflow Answer": {
"prefix": "dotexample",
"body": [
".example {",
"\t$0",
"}"
],
"description": "Creates a .example selector"
}
Then, in any scss file I would simply type the value found in the prefix property above, and I would see my snippet:
by using the tab key, I would then have those lines of code defined in the snippet, with my cursor placed in the position I want to type in:
This code took me 10 seconds to configure, and three keyboard keys to insert. If you type it often, it can be a huge productivity booster!
Anyway, like I said, personal preferences vary. But the more you learn about your IDE, the better your usage choices will be.
Good luck!

Sublime Linter not highlighting

Sublime Linter suddenly isn't displaying the nice ui highlighting it used to. It also isn't displaying lint messages in the bottom left of sublime. This may have happened after a recent windows update, but i wasn't paying close enough attention to be sure exactly when it occurred. I've followed the troubleshooting section on the documentation, and verified jshint is working in the command line. I've also switched to debug mode but I see no Linter errors in the console. I've also tried switching to manual lint mode, but the "Lint This View" option is grayed out. Not sure what to do at this point. Any suggestions?
You mention that you recently updated your copy of Windows, so it's possible that the Environment Variable for node(and other variables) have been removed or erased, I suggest you check that first.

Disable Sublime Text Minimap for a specific syntax

I'm trying to find a way to disable Sublime Text 3's minimap for a single syntax (Markdown) only and I'm not having much luck.
I've found a lot of references to adding "show_minimap": false, to your preferences both here and elsewhere but it doesn't seem to do anything regardless of whether I put it in Markdown.sublime-settings or Preferences.sublime-settings (I am restarting Sublime Text after changing the setting just to be safe).
The View/Hide Minimap menu item works globally but I can't set it for a specific syntax.
In most of the threads I've found I see some people saying that the setting doesn't work for them with other people saying it does but none of them seem to have an answer why and how you might fix it.
Has the syntax for that setting changed or has it simply been removed? I don't see it mentioned in the unofficial documentation.
If it does (still) exist is it something you can apply to a specific syntax or does it have to be a global setting?
Thanks!
I've tried both "hide_minimap": true and "show_minimap": false (alone and in combination) with ST2 2.0.2 and ST3 Build 3056 on XP, and nothing seems to work. I don't know the versions/platforms the answerers/commenters on your linked questions were using, but it seems that either the behavior was somehow removed recently, or it's platform-specific (maybe a little of both). I went back through the changelogs for ST2, ST3 Public Beta, and the ST3 dev builds and found a number of references to the minimap, but nothing to indicate that the functionality you're looking for had been removed intentionally.
We don't know if it makes a difference to the developer, but the community maintains an issue tracker on GitHub for things like this. Feel free to submit a new issue, with as much information as possible about what you've tried and the platform(s) and version(s) used, and we'll see where it goes.
If you're the plugin-writing type, there theoretically is a way around this, though. You could write an event listener that checks the scope of any newly-opened files, and if it matches text.html.markdown (or whichever type(s) of file for which you'd like to have the minimap hidden), it could execute the toggle_minimap command, which is what is fired when you select View -> Hide Minimap.
I'm working on that plugin, but it's not coming along very quickly. I'll report back if I can get it to work.
In OS X, Sublime text 3 try:
CMD+`
In Windows perhaps:
CTRL+`

How do I change even line background colours in Visual Studio?

I find the dark theme much easier to concentrate in, but I think I mucked something up a while ago and it turned the dark theme text editor into a monstrosity:
I tried clicking reset to defaults in this menu:
But it appears that that menu does not control this specific part because it did not change it back (Or god forbid it's supposed to look like this)
Does anyone know the solution for this?
It looks like you have an extension installed that is providing that coloring. Go to Tools->Extensions and Updates and check if there's anything about alternating line colors (perhaps this extension), and disable or uninstall it.

Visual Studio colors not loaded correctly

I use a custom color scheme in Visual Studio (black background, gray text, etc.). There a few settings that refuse to change, however. For example, when cursoring through the markup for an aspx page, the current tag defaults to black text, which doesn't work well on my black background. I've previously changed the appropriate setting to a "visible" color. In fact, to fix it, all I have to do is open the Options window, check and uncheck the Bold setting on Plain Text and hit OK, and now all my chosen settings are properly loaded. If I open a new session though, I have to go through these steps again. There are only a few settings where I notice this behavior (the Read-Only Region is another one), but it's annoying to have to do a dummy option change to get them to kick in. Has anyone seen this behavior before, and does anyone have a fix/workaround?
UPDATE: Found an interesting fix. I still don't know what the root cause is (probably some corruption as #sliderhouserules suggessts), but I've got a quicker way to fix it than using Tools | Options | Fonts and Colors. I simply exported my current color settings and created a macro to load them in:
Public Sub ImportColors()
DTE.ExecuteCommand("Tools.ImportandExportSettings", "-import:""C:\Documents and Settings\gregf\My Documents\Visual Studio 2008\Settings\FontsAnColors_Exported-2008-12-05.vssettings""")
End Sub
I then mapped that macro to a button on my toolbar. Now I have a one-click fix whenever my colors go awry. Not ideal, but much less painful now.
Sounds to me like you may have some corruption in your VS install or something (IE you need to reinstall VS). This doesn't sound like a bug, and you'd be fishing in the dark trying to repair your registry or whatever config files are involved in setting and storing these options for VS.

Resources