Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS Code keyboard shortcut to show online API document for golang?

I'ms using vscode and "go for Visual Studio Code" and vim emulation plugin to set up a golang IDE (keyboard is using vim style)

When I mouse hover an API, the online API document can be displayed. But is there a keyboard shortcut that can trigger the API document display?

like image 878
Feng Xi Avatar asked Nov 23 '25 15:11

Feng Xi


1 Answers

You are looking for editor.action.showHover shortcut:
The default key is: Ctrl+K Ctrl+I but not works with vim enabled, so you may change it to e.g.: Ctrl+K Ctrl+K, this works for me:

You can open this editor by going to the menu under File > Preferences > Keyboard Shortcuts. (Code > Preferences > Keyboard Shortcuts on Mac)
then search for Show Hover (or just Hover) and change shortcut for editor.action.showHover, see:

enter image description here

see: enter image description here

like image 131
wasmup Avatar answered Nov 25 '25 09:11

wasmup