Lee Jenkins
Lee Jenkins

Reputation: 2470

How to turn off the Quick Fix popup in VS Code

I am running VS Code 1.52.1 in Windows, editing JavaScript code. I am a double-click, copy & paste junkie. I mouse over something, like a function name, with the intent to double click copy it to the clipboard. But sometimes VS Code wants to suggest a "Quick Fix". This would be OK with me, except that the Quick Fix is displayed in a popup that overlays the code I am attempting to copy. Depending on how fast I am working, I may not notice until I paste the "old" contents of the clipboard into my target location.

Take the following function, for example.

// function to allow a promise-oriented caller to invoke
// a callback-oriented function
function callbackToPromise( resolve, reject ) {
    return function done( err, data ) {
        if(err) {
            reject(err);
        }
        else {
            resolve(data);
        }
    }
}

I mouse over the function name and the Quick Fix appears, overlaying the line of code where the mouse is hovering. The fix itself is redacted to avoid irrelevant discussion.

enter image description here

This behavior is both inconvenient and annoying, as it shifts my focus from the code to the misbehaving tool. It's like stubbing my toe a dozen times a day.

How can I configure VS Code not to automatically display Quick Fix popups? I would much prefer if VS Code would simply underline the function name and let me press the hotkey to see the popup.

Upvotes: 8

Views: 8054

Answers (2)

Binaryellipse
Binaryellipse

Reputation: 41

In Windows 10 this is how I did it: Settings -> Text Editor -> Quick Suggestions Delay.

Quick Fix Delay

Upvotes: 1

Gino Mempin
Gino Mempin

Reputation: 29536

I'm not aware of an exact/direct setting for the Quick Fix suggestion. What you can do though is to control the entire popup: increase the delay or disable it on mouse hover, then use shortcut keys to show it only when you want it to.

The settings for the mouse hover are editor.hover.*:

settings for editor.hover

"editor.hover.delay": 300,
"editor.hover.enabled": true,
"editor.hover.sticky": true,

Set editor.hover.delay to some "high" value, so it gives you time to double-click to copy things before the popup appears. Or, disable it entirely with editor.hover.enabled.

As for the hotkeys, in Keyboard Shortcuts, there's editor.action.showHover:

keyboard shortcut showHover

You can disable the popup on mouse hover with editor.hover.enabled set to false, and then just use the shortcut key to show it manually (I'm using a Mac so it's showing Mac shortcut keys. There should also be one for Windows.)

From the popup, there's also a shortcut key for directly showing the Quick Fix suggestions. You can also configure that from Keyboard Shortcuts as editor.action.quickFix:

keyboard shortcut quick fix

Again, you can disable the popup on mouse hover with editor.hover.enabled set to false and then just use the Quick Fix shortcut key to show it as needed.

Upvotes: 11

Related Questions