zargony / atom-language-rust

Rust language support in Atom - LOOKING FOR MAINTAINER, see #144
MIT License
116 stars 33 forks source link

Allow Rust core types to be highlighted just like user types #142

Open alexr00 opened 5 years ago

alexr00 commented 5 years ago

From @nox on February 2, 2019 15:15

I'm tired of seeing char, bool, etc being highlighted differently than Arc<T> etc, especially when char and friends can appear in module paths, where they don't refer to the core type. Is there any chance the theme could be updated to stop doing that?

Edit to include info from the comments: The grammar categorizes char in core::char::DecodeUtf16Error as storage.type.core.rust and it should probably just categorize it as source.rust.

Copied from original issue: Microsoft/vscode#67788

alexr00 commented 5 years ago

From @dbaeumer on February 4, 2019 8:46

Not sure if this is a theme or grammar problem.

alexr00 commented 5 years ago

@nox, I'm not very familiar with Rust. Is this an example of the different highlighting? image

alexr00 commented 5 years ago

From @nox on February 4, 2019 10:26

    core::char::DecodeUtf16Error,
    core::char::EscapeDebug,
    core::char::EscapeDefault,
    core::char::EscapeUnicode,
    core::char::ParseCharError,
    core::char::ToLowercase,
    core::char::ToUppercase,

Basically, those identifiers always appear in a different colour wherever they are. I filed an issue here because while I mostly do Rust, this is a common thing that themes do in all editors: colour things that it considers primitive/core/whatever in a different way, and I would like to be able to disable the behaviour across the board.

alexr00 commented 5 years ago

From @nox on February 4, 2019 10:28

Like, is there a way to tell the editor to paint things a different colour that is used by a different class of tokens, without giving it that specific other colour?

alexr00 commented 5 years ago

I see, thanks for the example. This is an issue with the grammar we use for Rust. It categorizes char in core::char::DecodeUtf16Error as storage.type.core.rust and it should probably just categorize it as source.rust.