19

When I'm writing the body of a function in VSCode, a window pops up showing the definition of the function, as shown in the attached screenshot. Does anyone know if there's a setting I can use to remove this?

Thanks!

enter image description here

gkeenley
  • 6,088
  • 8
  • 54
  • 129
  • 1
    Possible duplicate of [Disable tooltip hint in Visual Studio Code](https://stackoverflow.com/questions/41115285/disable-tooltip-hint-in-visual-studio-code) – Anurag Srivastava Mar 31 '19 at 18:27
  • Not a duplicate, the other one is about hover tooltips, this is about tooltips that pop up "when I'm writing the body of a function". Neither is named super well, but solutions are different. – Shawn Erquhart Nov 11 '22 at 15:52
  • Does this answer your question? [How do I disable the widget in VS Code that shows function parameter descriptions and overloads?](https://stackoverflow.com/questions/39972256/how-do-i-disable-the-widget-in-vs-code-that-shows-function-parameter-description) – starball Aug 11 '23 at 02:03

3 Answers3

24

That window is the signature help / parameter hints. Press esc to cancel out of an individual popup, or set"editor.parameterHints.enabled": false to disable it entirely.

Matt Bierner
  • 58,117
  • 21
  • 175
  • 206
  • 1
    Hi Matt, thanks for your quick reply. I'm using the UI to edit settings, and when I set Editor > Parameter Hints: Enabled to false, it gets automatically toggled back to 'true' when I exit or click elsewhere on the screen. Could you tell me how to find the actual settings.json file that has this setting in it? I haven't been able to find it yet. – gkeenley Mar 31 '19 at 19:35
  • With the settings editor open, click on the `{}` symbol at the right of the tab bar to open the raw `settings.json` file. Settings getting reverted unexpectedly could also be caused by an extension so you may need try to disable extensions if you are still seeing weird behavior – Matt Bierner Apr 01 '19 at 01:08
  • Using Matt's suggestion works on 1.61.0, and also has the benefit that if you _do_ wish to see the function definition/description, you can hover over the function name (i.e. just left of the parenthesis your cursor is within). – AGS Oct 14 '21 at 13:36
6

You should try setting "editor.quickSuggestions": false and "editor.suggestOnTriggerCharacters": false to disable the suggestions.

ciars
  • 112
  • 5
  • Right now I have "editor.quickSuggestions": { "other": false, "comments": false, "strings": false }, and "editor.suggestOnTriggerCharacters": false, No luck though. – gkeenley Aug 22 '19 at 13:57
4

Parameter hints could be useful, I would suggest to set simple keybindings to toggle between show/hide parameter hints.

I use the following settings/keybindings to toggle using shift+space and space.

  • Disable parameter hint by adding "editor.parameterHints.enabled": false to settings.json.

  • Bind shift+space to trigger parameter hints. Default is ctrl+shift+space.

//keybindings.json
    { 
        "key": "shift+space",
        "command": "editor.action.triggerParameterHints",
        "when": "editorHasSignatureHelpProvider && editorTextFocus" 
    },
  • Bind space to hide parameter hint.Default is esc.
//keybindings.json
    {
        "key": "space",
        "command": "closeParameterHints",
        "when": "editorFocus && parameterHintsVisible" 
    }