Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VScode autocomplete doesn't work for CSS files

Autocomplete for CSS is not working in VSCode.

enter image description here

Usually, if I start writing an statement inside a CSS file, VSCode has an intenseness, which suggested all possible options. But as you can see, it doesn't work inside my css file.

Any help?

like image 338
user1941537 Avatar asked Apr 12 '20 12:04

user1941537


People also ask

Why is my autocomplete not working in VS Code?

Why is VS Code suggestions not working? If you're coding in JavaScript or TypeScript and finds that VSCode IntelliSense does work but does not behave properly, it's likely that you've selected the wrong language mode. TypeScript and JavaScript share the same language service, so you need to select the right language.

Why my CSS is not working in VS Code?

The problem may be that your browser is caching the CSS file. If you're debugging with Edge, you can open the F12 tools and click on the Network tab. At the top, you'll find a button to "always refresh from server." Turn this on, and files won't be cached. Chrome has a similar feature.

How do I enable autocomplete in VS Code?

PS: Pressing "Enter" works fine and accepts the suggestion and I can disable it by setting the following setting to off. Don't know if this helps, but you can press CTRL+SPACE to bring up autocomplete.

How do I enable autocomplete in Visual Studio?

The suggestion list of Automatic completion appears as soon as you start typing a new identifier. The suggestion list of Basic completion appears when you press the default Visual Studio IntelliSense shortcut Ctrl+Space .


2 Answers

I had the same issue after I installed the VSCode extension PostCSS Language Support,

I fixed it by disabling the extension.

like image 103
Andy Ho Avatar answered Oct 20 '22 17:10

Andy Ho


If you have PostCSS Language Support installed add the following config in your settings.

{
  "emmet.includeLanguages": {
    "postcss": "css"
  }
}
like image 23
Alireza Sarabchi Avatar answered Oct 20 '22 18:10

Alireza Sarabchi