atom-pigments
atom-pigments copied to clipboard
SCSS variables from imported modules don't resolve
Here's a question / possible feature request for projects with node packages, such as those using Webpack and sass-loader.
If I have a file like this in my project dir:
// _variables.scss
$coolcolor: $f00;
Pigments will read it and highlight $coolcolor in red as expected throughout my project, even if I haven't opened the file in Atom. (This is great)
However, if I bring in some variables form a package in node_modules:
// _variables.scss
@import "~bulma/sass/utilities/_all";
$coolcolor: $f00;
The bulma import in the example above brings in variables like $primary and $secondary, but those won't be highlighted by Pigments.
Maybe this is the intended behavior, because node_modules/* is in the "Ignored Names" section in the Pigment options, but I have explicitly imported the file into my project, so I might expect Pigments to read that file. Is there a way to do this without just whitelisting all of node_modules/?
I too think this is because Pigments skips the node_modules/ directory. Would it be an idea to whitelist just the node_modules/bulma/sass/utilities directory?
That's an idea (although I'd have to whitelist every different library I want to use from node_modules) ... How do I whitelist items in the preferences?