Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 98396

How to open the lightbulb via shortcut?

$
0
0

Some languages support code actions which display a lightbulb providing quick fixes for a warning/error (See https://code.visualstudio.com/docs/editor/editingevolved#_code-action for more information). I like this feature but I don't like to click on the lightbulb. Unfortunately I can't find a shortcut for opening the lightbulb at the current cursor position. How can I create such a shortcut?

I tried to create a shortcut for vscode.executeCodeActionProvider by creating a custom keybinding like this:

[{ "key": "alt+enter", "command": "vscode.executeCodeActionProvider"}]

But everytime I hit the shortcut I receive the warning

Running the contributed command:'vscode.executeCodeActionProvider' failed.


Viewing all articles
Browse latest Browse all 98396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>