sublime_text icon indicating copy to clipboard operation
sublime_text copied to clipboard

Assign color to `variable` scope in Mariana

Open deathaxe opened this issue 2 months ago • 2 comments

Problem description

Mariana doesn't specify a dedicated rule to highlight variable scope. Instead it relies on them not being highlighted by forground text color.

If a variable however is stacked with another scope, like string.unquoted variable, it is highlighted as ordinary string.

This results in issues like: https://github.com/sublimehq/Packages/issues/4321

Even though it would be desirable to remove string scope in such cases, it is sometimes hard, expensive or even impossible to achieve (reliably).

Preferred solution

Add a highlihghting rule for variable scope to Mariana.

{
	"scope": "variable",
	"foreground": "var(white3)",
},

Alternatives

Let variables be highlighted by whatever rule applies, depending on stacked scopes.

Additional Information

No response

deathaxe avatar Oct 01 '25 18:10 deathaxe

I thought that this already existed, and then I realized that I have exactly the rule above in my overrides.

michaelblyons avatar Oct 01 '25 19:10 michaelblyons

Maybe also worth considdering python objects.

{
	"scope": "meta.generic-name, variable",
	"foreground": "var(white3)",
},

deathaxe avatar Oct 10 '25 12:10 deathaxe