bajrangCoder / zed-scss

SCSS support for Zed
9 stars 1 forks source link

[MacOS] cmd + click on a variable #6

Open acranglesim opened 1 month ago

acranglesim commented 1 month ago

Is it possible to have cmd + click on a variable take you to where the variable is declared?

Or offer a list of where multiple variations have been declared.

bajrangCoder commented 1 month ago

Is it possible to have cmd + click on a variable take you to where the variable is declared?

I think it's already available (btw I haven't tested) And this plug-in supports features which are available in vscode-css-language-server

acranglesim commented 1 month ago

As far as I can tell - it does not work...cmd + click takes you to references of where the $variable is used, not where it is created.

For example:

$variable = #ffffff;

body {
    background-color: $variable;
}

Cmd + Clicking $variable inside the body background color doesn't take you to $variable = #ffffff;

bajrangCoder commented 1 month ago

I know it doesn't work with the external variable which is defined in other file. But it works fine in same file 👇

https://github.com/bajrangCoder/zed-scss/assets/71929976/3a95a5f6-03a0-46e3-bf2c-d9923b146873

acranglesim commented 1 month ago

Ah, sorry! That is what I had meant, I keep all my variables in a separate variables file - my fault on explaining poorly!