I have a styles.scss
and a partial that holds some color variables _colors.scss
.
_colors.scss
:
$primary: #009688;
$secondary: #4caf50;
styles.scss
:
@import 'colors';
.blurred {
color: $primary;
filter: blur(2px);
}
This works, but I would like to be able to have intellisense for the $primary
variable, just as if it was declared in styles.scss
. Is there a feature/extension available for VS code that can do this?
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 .
IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you're using, keep track of the parameters you're typing, and add calls to properties and methods with only a few keystrokes.
You can enable or disable particular IntelliSense features in the Options dialog box, under Text Editor > C/C++ > Advanced. To configure IntelliSense for single files that aren't part of a project, look for the IntelliSense and browsing for non-project files section.
Install SCSS IntelliSense
https://marketplace.visualstudio.com/items?itemName=mrmlnc.vscode-scss
Image source
There is no color preview though https://github.com/mrmlnc/vscode-scss/issues/13
because vscode doesn't support this yet and there is no plan to add it https://github.com/mrmlnc/vscode-scss/issues/29
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With