Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments and rustdocs colored the same #145

Closed
qrilka opened this issue Apr 16, 2024 · 6 comments
Closed

Comments and rustdocs colored the same #145

qrilka opened this issue Apr 16, 2024 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@qrilka
Copy link

qrilka commented Apr 16, 2024

Before catppuccin I was using material-theme where those colors are different and it's rather convenient

@NamesCode NamesCode added enhancement New feature or request good first issue Good for newcomers labels Jun 4, 2024
@jtbx
Copy link
Member

jtbx commented Aug 9, 2024

What package provides these "rustdoc" faces? I can't find them in the rust-mode package nor the built in rust-ts-mode.

@qrilka
Copy link
Author

qrilka commented Aug 9, 2024

Unfortunately I don't know the answer

@jtbx
Copy link
Member

jtbx commented Aug 9, 2024

Hmm weird. I've looked in the material-theme source and I can't find any mention of rustdoc.
What mode is this in? Also it would help if you could move your cursor over one of these
rustdoc characters and read out what M-x describe-char shows about the face name (while
having material-theme activated preferably).

@qrilka
Copy link
Author

qrilka commented Aug 9, 2024

I'll try to do that later today

@qrilka
Copy link
Author

qrilka commented Aug 9, 2024

That's what I get for rustdoc:

             position: 3626 of 27480 (13%), column: 25
            character: l (displayed as l) (codepoint 108, #o154, #x6c)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x6C
               script: latin
               syntax: w which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 6c" or "C-x 8 RET LATIN SMALL LETTER L"
          buffer code: #x6C
            file code: #x6C (encoded by coding system undecided-unix)
              display: by this font (glyph code):
    ftcrhb:-1ASC-Liberation Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x4F)

Character code properties: customize what to show
  name: LATIN SMALL LETTER L
  general-category: Ll (Letter, Lowercase)
  decomposition: (108) ('l')

There are text properties here:
  face                 font-lock-doc-face
  fontified            t

[back]

and that's for a regular comment:

             position: 4143 of 27480 (15%), column: 11
            character: e (displayed as e) (codepoint 101, #o145, #x65)
              charset: ascii (ASCII (ISO646 IRV))
code point in charset: 0x65
               script: latin
               syntax: w which means: word
             category: .:Base, L:Strong L2R, a:ASCII, l:Latin, r:Roman
             to input: type "C-x 8 RET 65" or "C-x 8 RET LATIN SMALL LETTER E"
          buffer code: #x65
            file code: #x65 (encoded by coding system undecided-unix)
              display: by this font (glyph code):
    ftcrhb:-1ASC-Liberation Mono-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1 (#x48)

Character code properties: customize what to show
  name: LATIN SMALL LETTER E
  general-category: Ll (Letter, Lowercase)
  decomposition: (101) ('e')

There are text properties here:
  face                 font-lock-comment-face
  fontified            t

[back]

@jtbx
Copy link
Member

jtbx commented Aug 9, 2024

Ah, your rustdocs are using font-lock-doc-face, while comments are using font-lock-comment-face. These different faces have been chosen by the author of the mode you're using. The Catppuccin theme uses the same colour for both comments and documentation; this is a design choice. If you want a different color for documentation, you can use this elisp code:

(set-face-attribute 'font-lock-doc-face nil :foreground (catppuccin-get-color 'subtext0))

Alternatively you can customize it further with M-x customize-face RET font-lock-doc-face RET. I'm closing this now, thank you!

@jtbx jtbx closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants