zed icon indicating copy to clipboard operation
zed copied to clipboard

Add traits in Rust highlights

Open Otterpocket opened this issue 1 year ago • 3 comments

Question: I use type.super here because I made a similar change to the ruby syntax to apply the same style to superclasses. With this in mind, should this change be renamed to type.trait or should it be renamed to something like type.italic so the ruby syntax or any other language can all use type.italic? or maybe something else altogether.

image

Release Notes:

  • Exposed Rust traits as type.interface for individual syntax theming.

Otterpocket avatar Apr 18 '24 14:04 Otterpocket

I don’t think type.super makes sense, as Rust doesn’t have a concept of inheritance (outside of supertraits).

type.trait sounds good, or maybe type.interface if we want something slightly more language-agnostic.

maxdeviant avatar Apr 18 '24 14:04 maxdeviant

I don’t think type.super makes sense, as Rust doesn’t have a concept of inheritance (outside of supertraits).

type.trait sounds good, or maybe type.interface if we want something slightly more language-agnostic.

Are you happy if we have both type.interface and type.super ?

Otterpocket avatar Apr 18 '24 14:04 Otterpocket

I don’t think type.super makes sense, as Rust doesn’t have a concept of inheritance (outside of supertraits). type.trait sounds good, or maybe type.interface if we want something slightly more language-agnostic.

Are you happy if we have both type.interface and type.super ?

I think it depends on if there is some language that uses both.

Like C# has both superclasses and interfaces, but I'm not sure exactly how those are differentiated at the syntax level (if they are at all).

If Ruby is the only one that ends up using type.super then it seems that maybe it should converge towards the others.

maxdeviant avatar Apr 18 '24 14:04 maxdeviant