How to disable the light bulb in Visual Studio Cod

2019-05-14 00:19发布

问题:

I love Visual Studio Code but I hate the little lightbulb. It seems to clash with the dropdown when you Ctrl+. on word.

How do you disable the lightbulb in Visual Studio Code?

Just to clarify - I always use the Ctrl+.. But on the first time when I try to navigate down the drop down menu the menu disappears and the lightbulb re-appears. I then have to Ctrl+. again to go down the drop down list and get the selection I want. I just want to disable the lightbulb itself, not other functionality such as the quick fixes.

回答1:

There's a new option that you can use to disable that. Go to your settings file and add:

"editor.lightbulb.enabled": false


回答2:

Go to: > File >Settings

Enter "bulb"

Click on the checkmark to remove it.



回答3:

I'm not sure what you mean. You want to disable the visual element of the lightbulb? Or you want to eliminate "quickFix" altogether?

There is this keybinding which triggers the same action as the lightbulb:

{ 
    "key": "ctrl+.",
    "command": "editor.action.quickFix",
    "when": "editorHasCodeActionsProvider && editorTextFocus && !editorReadonly" 
}

If you are wanting to disable the keyboard shortcut you could do that by adding this line to keybindings.json

"key": "ctrl+.", "command": ""

If you want something ELSE mapped to "ctrl+.", then you can put that command in the command above.

If you're wanting to disable the lightbulb itself from appearing, I don't think that is possible.