Reputation: 100
Whenever VSCode does suggestions and I choose one of those suggestions, it adds "={}" behind any variable I auto-complete.
I recorded a little clip to demonstrate the problem:
I want it to just autocomplete "album" in this case. Not "album={}".
Upvotes: 5
Views: 1355
Reputation: 1171
run code
in the settings search barEdit in settings.json
to open the settings.json
file"javascript.preferences.jsxAttributeCompletionStyle": "none"
line to your settings.json
fileWhy we do this:
In the defaultSettings.json
file there is this code snippet:
// Preferred style for JSX attribute completions.
// - auto: Insert `={}` or `=""` after attribute names based on the prop type.
// - braces: Insert `={}` after attribute names.
// - none: Only insert attribute names.
"javascript.preferences.jsxAttributeCompletionStyle": "auto",
therefore, the default setting for jsxAttributeCompletionStyle
is auto
and by setting it to "none"
in your settings.json
file you overwrite that default setting.
Upvotes: 8