right click context menu in vs code executes immediately - visual-studio-code

When I right click in the editor, vs code executes whatever menu item the cursor happens to be over. It happens far too fast for me to make my actual choice known.
I have already spent 30 minutes trying to find a solution. If you search for "right click" in the Command Palette, you are told there are no matches. You don't get any hits in the docs, either. Please advise. Thank you.

It has been reported that the situation you mentioned is a bug in the repository on GitHub. It is reported that Visual Studio Code works fine when zoom is disabled.
You can update the following setting to override this behavior:
"editor.mouseWheelZoom": false
Or you can update the mouseWheelZoom setting from the pop-up window by using the shortcut CTRL + , to go to Settings.

It's crazy, but this is still an issue for Linux users after so many years. Especially, when using a Laptop with touch-pad it makes VSCode frustrating to use. The problem occurs when you use "native" window style (you can tell, because the theme will not be applied to context menus) and have a non-default zoom.
The GitHub issue that #sercan linked to has a few solutions. In order to save you some time, there is basically two things that I found work and make sense:
Set your zoom level to default / 0. In settings.json add: "window.zoomLevel": 0 This works with all window styles, but obviously is not always viable
Change the title bar style from native to custom. In settings.json add: "window.titleBarStyle": "custom" This will change how the title bar but also the context menus look. Setting this, you can zoom in again

Related

How to enable again the tooltip/hint in VSC?

My VSC shows the wavy underlines when something's wrong with my code, but does not display the hint overlay when I hover my mouse on it.
This happens whatever the language used (from CSS to Typescript) and whatever the type of irregularity (e.g. notice, warn, danger)
I'd say that's a setting I may have changed at some point, but can't find which one. Any idea?
More details:
I do have the message displayed in the Problems tab besides to the Terminal, but it forces me to switch from tab to tab ;
I do have other overlays like autocomplete/autosuggest ;
No extensions in my setup could have led to that situation (only a few installed, widely downloaded, nothing fancy or dodgy).
Actual behavior (nothing happens):
Expected behavior (from google images)
Go to File > Preferences > Settings.
Search for 'hover.enabled' (See below photo).
Toggle it.
If your editor still does not pick up the change, close all tabs, close all VSCode windows, and reopen it.
If it's still not working, try uninstalling VSCode and reinstalling it (make sure you don't have setting sync on).
Also, this question has been answered in at least one other place (Disable tooltip hint in Visual Studio Code)

PR 104923 Make clicking in scrollbars move by page, how and where do i set it to true?

In November 2020 VSCode got a PR #104923.
It made it possible to click in the scrollbar in the editor, to move 1 page at a time, in stead of jumping somewhere.
So the normal scrollbar click behaviour in windows.
I have searched the settings and online everywhere, but I have no idea where and how, I can set the parameter to true.
About the parameter itself:
In this PRT it says on sep 16 2020:
"I made the setting editor.scrollbar.gutterClickMovesByPage default to false"
And near the end it says:
"Rename option to scrollByPage".
So what is its name, and where can I find it.
Thanks!
(I use VSCode version 1.55.0)
On Linux, adding in ~/.config/Code/User/settings.json:
{
"editor.scrollbar.scrollByPage": true
}
seems to have done the trick for me. Nowhere documented indeed and https://github.com/microsoft/vscode/issues/43564 still shows unreleased, while commits did got tagged with release versions. It took me some time today to figure out how to enable this.
EDIT: You need to restart VSCode in order to have this option considered.
To find the settings.json file's location: on Linux vscode, after opening the Settings, just hover over the User tab in the first line and it shows the file location. Probably that's the same on other platforms.
Option does not show in the list of known and documented options from UI.
That's bad that they left the jumpingbars by default instead of the scrollbars. When using a touchpad and not a mouse, that's really frustrating to have these jumpingbars.

How to turn on snippet preview in adjacent window using vscode?

Can't find a setting to show description on the right side. Default user settings on MacOS.
toggleSuggestionDetails command gives details (if you won't hide it, details will appear every time). Default keybinding for this command on Mac is ctrl+space, which prevents to expand a widget (cause language changing uses the same keybinding). I just chose other keys to show more without changing user settings (but added "editor.suggest.showStatusBar": true since it seemed useful to me).

Enabling auto scroll in Visual Studio Code

Is there any way that we can enable auto scroll in Visual Studio Code? I have been looking in the settings but could not find anything(unless i missed something).
I am reviewing a log file and as it gets updated, its refreshed on my side. But it is not showing the latest logs but just stays where my cursor was and highlights everything that gets populated after that.
Had the same problem but did not find a setting within VS Code.
However there is an extension for VS Code:
https://marketplace.visualstudio.com/items?itemName=pejmannikram.vscode-auto-scroll
Works quite well for me.
There's now a built in VSCode setting - you can untick Smart Scroll option (output.smartScroll.enabled).
As described here:
VSCode: Turn auto scrolling permanently ON
"An option to turn off the smart scroll feature was included in one of the recents update (probably in the March 2020 update, I didn't found this on the changelog), see more: issue #69480
Since then, I've been able to "save" the scroll state, try this:
Go to File > Preferences > Settings (or Ctrl + ,)
In Features > Output, disable Smart Scroll option (or search output.smartScroll.enabled)"

VSCode: I want to remove annoying info message bar

Is there any way to completely remove this message popup or move it to somewhere?
I already know why this message comes, but I do not want to disturb my activity with annoying info popup.
When it pops up it hides the document tab, so I have to close it every single time. (I do not want to know how to fix this particular error message, this screenshot is just an example.)
It's very annoying and I've searched around for a way to remove it, but the answers keep saying how to fix that particular error and not how to hide the popup itself.
Press ESC.
I agree that this is really annoying. VS Code is all about high-speed workflow and not having to interact with anything except your code via keyboard. Everything has key chords, e.g. CTRL-P and CTRL-SHIFT-P. So having to stop what I'm doing, go to the mouse, and dismiss this popup, whenever a background task feels like completing (and not even really then, because the popup actually appears some short time later) just so I can get visual confirmation of which file I'm currently coding in, to refocus my work after being distracted by the same popup, is really awkward. They are in a stupid location and don't even fade away after time like well-behaved toasts.
That said, I think that's really two parts; the distraction, and relatively high workflow cost to dismiss.
It helped me a lot to learn that it can be dismissed quickly and easily with the ESC key. The other half the problem I still haven't solved, but hope that helps you.
In the screenshot it shows trying to validate PHP.
In a VS Code window select File > Preferences > User Settings
An editor will open on the left called Default Settings and on the right with a file called settings.json
In the right side editor you can add settings that will override those found in the left-hand-side one.
Between the braces type:
// Whether php validation is enabled or not.
"php.validate.enable": false,
Then save the document.
VS Code will no longer attempt to validate PHP files.
You can override any of the defaults using this method.
You can use the same technique for each Workspace (or project folder) using File > Preferences > Workspace Settings
You can't disable the alert bar in general as VS Code needs to tell you things and doesn't (thankfully) use modal dialogs to communicate.
Go to File > preferences > settings
Then add this to your user settings
"editor.parameterHints": false
You may want to try adding the line
"extensions.ignoreRecommendations": true
to your VS Code settings file (which you can easily reach with the keystroke (CMD + ,) on a Mac OS X or macOS system.)
Solution: User Preferences > change "editor.parameterHints": true to "editor.parameterHints": false
This will at least remove the obstructive boxes that appear above the cursor.