liviuschera / noctis

Noctis is a collection of light & dark themes with a well balanced blend of warm and cold colors
https://marketplace.visualstudio.com/items?itemName=liviuschera.noctis
MIT License
547 stars 66 forks source link

Rust: make references be distinguishable #81

Open zanedp opened 7 months ago

zanedp commented 7 months ago

Ideally, the color theme should make things that aren't obvious from the local syntax stand out. When editing Rust code, it's not clear from syntax when a variable is a reference, especially when using type interference or chained iterators.

I suggest that rather than have property accesses be in italic, have references be in italic.

I have no trouble telling syntax when I'm accessing a property (there's a dot!), but I don't always know if something is a reference until the compiler yells because I didn't use a reference like a reference (or vice versa).

I have found adding these to my editor.sematicTokenColorCustomizations in settings helps me out a ton when editing Rust code because it makes it obvious whether something is a reference or not: variables that are references are italics, and methods that take a reference to self (&self or &mut self) are also italicized.

        "enabled": true,
        "rules": {
            "property": {
                "fontStyle": ""
            },
            "*.reference": {
                "fontStyle": "italic"
            },
        }

This request is probably related to #43.