junichi11 / netbeans-color-codes-preview

Show colors in an editor's sidebar
https://netbeans-vm.apache.org/pluginportal/catalogue/?id=24
Apache License 2.0
32 stars 8 forks source link

Please support variables from less/sass. #7

Closed Chris2011 closed 6 years ago

Chris2011 commented 9 years ago

Man, first of all, this is really a life saver. Big thx, I really like it. My only problem, atm is, that if I have this inside a file called _variables:

$grey-normal: #eee;
$grey-hover: #fff;
$grey-click: #aaa;

everything is fine and it works, when I import this file into an other and I use this:

background-color: $grey-normal.

it doesn't resolve the variable value. This would be a nice enhancement too.

Regards

Chris

junichi11 commented 9 years ago

Hi Chris,

Now, this plugin doesn't check color values per mime-type. Search just color value literals. So, at first this plugin has to check a mime-type, then has to check all variables whether they have a color literal using a lexer/parser for less/sass, finally has to check whether the current line has the variables if implement your request.

I'm not sure whether I can do it soon. But I understood your request.

Thanks, Junichi

Chris2011 commented 7 years ago

Anything new here?

junichi11 commented 6 years ago

Fixed. https://github.com/junichi11/netbeans-color-codes-preview/releases/tag/v0.8.0

Note: Resolve the simplest cases only: e.g. $green: #0f0; Then, in this case the popup does not work. I won't fix it. This feature does not work by default. So you have to check the checkbox in the option panel.