Reputation: 47
I'm using the Visual Studio Code. I never want auto semicolon after CSS properties. But VS Code gives me an auto-complete option which I don't like.
How can I stop auto-complete semicolon at the end of CSS properties?
Upvotes: 5
Views: 6017
Reputation: 3949
Adding .prettierrc file in project root worked for me with following settings:
{
"files": [
"**/*.css"
],
"options": {
"semi": false,
"parser": "css"
}
}
Upvotes: 0
Reputation: 111
Press Control + Shift + P in VSCode.
Search For Preferences: Open Settings (UI)
.
Again in the Searchbar, search for Semicolon
.
Choose CSS or your preferred language from where you want to remove auto semicolon.
Untick Insert semicolon at the end of line when completing CSS properties
.
And you are done.
Upvotes: 6
Reputation: 842
or
search the code & change it from true to false.
// Insert semicolon at end of line when completing CSS properties
"scss.completion.completePropertyWithSemicolon": false,
From: https://code.visualstudio.com/docs/getstarted/settings
Upvotes: 8
Reputation: 1101
In Settings
go to Extensions
-> CSS
and uncheck 'Completion: Complete Property With Semicolon'
Upvotes: 2