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

docs(style-guide)!: improve and define more highlights #2109

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Jint-lzxy
Copy link

Sorry for the long wait. This PR is a continuation of catppuccin/nvim#481, aimed at defining (and updating) more syntax groups and drafting a table for LSP semantic tokens. List of modifications: catppuccin/nvim#481 (comment).

Let me know if I need to change anything :)

[preview style-guide.md]

@nullchilly
Copy link

1 for using teal as delimiter (; / . / ,)

cc @catppuccin/core

image

@sgoudham
Copy link
Contributor

Hi @Jint-lzxy, firstly I want to apologise for the length of time this PR has sat here. I've always ended up looking at this PR and thinking to myself "oh yeah, I should look at this" but failed to follow through with it. As I hope you'll be able to appreciate, we all volunteer our free time for this theme and I try not to work on Catppuccin if I don't have the motivation for it.

With regards to the PR... frankly, the syntax highlighting changes proposed in this PR does not align with the syntax highlighting that we hope to achieve for all editors. @nekowinston and I have spent the last year modifying and updating editors like VSCode and Intellij to be consistent and coherent with each other with neovim as a starting point, and have influenced the syntax highlighting of other editors from this. E.g. mauve keywords, green strings, yellow classes and we took that further for other editors.

While working on VSCode's syntax highlighting, winston implemented a build system with chromatic showing the syntax highlighting colours for a set of languages. This is more of a sanity check than anything else but it is a good resource to see the "vibe" of syntax highlighting that we're aiming for editors.

Ultimately, I think a few things need to happen for this PR to be merged:

  1. Revert changes made in tables Language Defaults & General
  2. Modify the LSP Semantic Highlights table to be more in line with the editors mentioned above. For example:
    • Parameters should be maroon
    • Builtins should be red
    • Regex should be pink but if it can be more in detail, it should inherit the other colour mappings (e.g. numbers in regex should be peach, lookaheads being blue since they act like a function taking values, etc) - See VSCode's PR on this (feat(regex): add dedicated syntax highlighting for regex vscode#263)
    • Enum Members should be teal
    • Macro should be blue

While this probably isn't the reply you were hoping for, hope this makes sense as a way to move forward 👍

@sgoudham sgoudham added the waiting on author Waiting on action from the maintainer label Feb 11, 2024
@sgoudham sgoudham mentioned this pull request Feb 14, 2024
1 task
Copy link

@ruru-m07 ruru-m07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Jint-lzxy
Copy link
Author

Hey @sgoudham, first off please allow me to apologize for my prolonged period of inactivity. I've been super busy during that time and couldn't get around to replying promptly to the notifications Catppuccin sent to my email. But now I've got it all sorted out and I'm actively catching up!

I've always ended up looking at this PR and thinking to myself "oh yeah, I should look at this" but failed to follow through with it.

No worries at all! Thanks a ton for taking the time to review my preliminary PR! I really appreciate it ❤️

As I hope you'll be able to appreciate, we all volunteer our free time for this theme and I try not to work on Catppuccin if I don't have the motivation for it.

Yeah! I really appreciate the tremendous effort put in by the core team. To be frank, I didn't mean to rush you at that time. I just wanted to know if there's any progress with this PR and if I should provide some explanations or participate in the discussion, as I'm sure there will be quite a few changes and discussions happening before this PR gets merged. Also, I really wanna express my gratitude to the staff team and all the ports maintained by Catppuccin. They are all so beautiful! I've been using Catppuccin everywhere I can and have introduced it to many of my friends. I genuinely hope Catppuccin continues to grow and gets more recognition. Plus, now that I have more free time, I feel like I can spend more time maintaining it (I slacked off too much before :laughing:).

With regards to the PR... frankly, the syntax highlighting changes proposed in this PR does not align with the syntax highlighting that we hope to achieve for all editors.

Oops, sorry for the misunderstanding on this! Initially, I actually had two motives for opening this PR. One was to refine the style guide, and the other was to propose some ideas regarding color combinations (hence the differences from the current implementation). I actually got inspired from versions way back (likely before the first treesitter.lua breaking change), but I agree this should have been discussed in a separate thread. Very sorry for my oversight here!

... have spent the last year modifying and updating editors like VSCode and Intellij to be consistent and coherent with each other with neovim as a starting point, and have influenced the syntax highlighting of other editors from this. E.g. mauve keywords, green strings, yellow classes and we took that further for other editors.

Wow, this looks like a lot of work! I'll definitely check them out and in the process, tidy up the current naming scheme, trying to catch the design motivation (the "vibe") behind them 😸

While working on VSCode's syntax highlighting, winston implemented a build system with chromatic showing the syntax highlighting colours for a set of languages. This is more of a sanity check than anything else but it is a good resource to see the "vibe" of syntax highlighting that we're aiming for editors.

Thanks for this extra resource; I'll be sure to take a look at it!

Ultimately, I think a few things need to happen for this PR to be merged:
...

Haha, I'm totally cool with any potential changes! I just wanna ask if there's a chance for another "major overhaul" of the current color scheme? Because personally, I feel like there are still some clashes between certain elements, and maybe discussing them could lead to a better solution. Perhaps we could start a new thread to talk about this? I could also create a draft style guide based on the current naming scheme and update my progress here.

By the way, I'm wondering if there's a chance for me to join Catppuccin? I'll have more free time in a month, and I'm really keen to pitch in and help maintain it!

@sgoudham sgoudham removed the waiting on author Waiting on action from the maintainer label May 3, 2024
@sgoudham
Copy link
Contributor

sgoudham commented May 3, 2024

No worries at all! Thanks a ton for taking the time to review my preliminary PR! I really appreciate it ❤️

No problem!

I genuinely hope Catppuccin continues to grow and gets more recognition.

Me too :D

Haha, I'm totally cool with any potential changes! I just wanna ask if there's a chance for another "major overhaul" of the current color scheme? Because personally, I feel like there are still some clashes between certain elements, and maybe discussing them could lead to a better solution. Perhaps we could start a new thread to talk about this? I could also create a draft style guide based on the current naming scheme and update my progress here.

I'm not entirely sure what you have in mind for "major overhaul" but if you're talking about the colour palette as a whole, then I can confirm that the staff team don't have plans to modify the existing hex codes for the v0.2 colours. However, we are constantly seeking to improve and standardise the application of the palette in code editors / terminals etc. I can confirm that the staff team are working away in the background to finally resolve #1961 and make our colour scheme much more suitable for terminals by default (which means defining new colours but not changing existing ones)

I'm not entirely too happy with the format of the style guide document at the moment as it's a huge pain to edit in the table format. I think the future vision would be to have a nice style guide section/page on catppuccin.com but that's definitely lower in priority than making sure the content of the style guide is clear, concise and descriptive. I'd be interested in hearing ideas on how else to display the style guide while restrained to GitHub's markdown format!

Besides GitHub, our primary platform for collaboration is our Discord server which I'd encourage you to join and start a thread there regarding style guide improvements.

By the way, I'm wondering if there's a chance for me to join Catppuccin? I'll have more free time in a month, and I'm really keen to pitch in and help maintain it!

If you mean joining the Catppuccin maintainers team, we usually invite people to the organisation if they have created a port and would like to transfer it under the Catppuccin namespace. Recently, we've documented the current maintainers for the ports in our ports.yml which people are encouraged to add/remove themselves from! I'm still in the progress of documenting/revamping our contributing guidelines to mention this.

@sgoudham sgoudham added the waiting on author Waiting on action from the maintainer label May 3, 2024
@Jint-lzxy
Copy link
Author

I'm not entirely sure what you have in mind for "major overhaul" but if you're talking about the colour palette as a whole...

Sorry for the confusion! It's not about the colors themselves; I was actually talking about the highlight groups. The real issue I was trying to address is the inconsistency between different ports. At least from the ones I use (bat, btop, kitty, nvim, obs, xcode, and a few others) I've noticed that while some "highlight groups" have different names across applications, they often serve the same purpose (e.g., highlighting search results). However, they're sometimes handled differently across these ports. imho this is more like an attempt to "improve and standardize the application of the palette".

I'm not entirely too happy with the format of the style guide document at the moment as it's a huge pain to edit in the table format. I think the future vision would be to have a nice style guide section/page on catppuccin.com but that's definitely lower in priority than making sure the content of the style guide is clear, concise and descriptive. I'd be interested in hearing ideas on how else to display the style guide while restrained to GitHub's markdown format!

Not sure if this will be really helpful, but to make life easier when collecting and styling the keybinding collection and plugin dependencies graph for one of my project's wiki pages, I created a tiny YAML parser (haven't made it public though, there are still some bugs waiting to be fixed) which generates HTML tables that play nice with GitHub (it can also be added to catppuccin.com with a bit more styling imo). Besides the usual syntax, it also supports patching, appending, and including other yml files. I can tweak it a bit to fit our needs here if that sounds good to the team.

Another idea that just popped into my head is to use vector graphics, but this might not function smoothly on mobile devices.

Besides GitHub, our primary platform for collaboration is our Discord server which I'd encourage you to join and start a thread there regarding style guide improvements.

I've already joined the server earlier this year; I'll definitely start a thread there later this month when I have more time :D

If you mean joining the Catppuccin maintainers team, we usually invite people to the organisation if they have created a port and would like to transfer it under the Catppuccin namespace. Recently, we've documented the current maintainers for the ports in our ports.yml which people are encouraged to add/remove themselves from! I'm still in the progress of documenting/revamping our contributing guidelines to mention this.

Thanks for the clarification! I'm planning to maintain a new port (specifically lnav), but I'm still in the process of creating the theme right now, so it probably needs more time to really have that ready XD

@Jint-lzxy
Copy link
Author

I've finally settled down and finished the exploration! This comment contains several charts I created during the exploration, along with a brief summary at the end. All of the following content refers to the current style guide, the latest versions of each port (IDE/editor), and the chart mentioned below (also found under General Usage in the style guide):

╒══════════════════════════════════╕ ╒═══════════════════════════════════╕
│        Background Colors         │ │            Typography             │
╞══════════════════╤═══════════════╡ ╞═══════════════════════╤═══════════╡
│     Function     │    Colors     │ │       Function        │ Colors    │
├──────────────────┼───────────────┤ ├───────────────────────┼───────────┤
│ Background Pane  │ base          │ │ Body Copy             │ text      │
├──────────────────┼───────────────┤ ├───────────────────────┼───────────┤
│ Secondary Panes  │ crust, mantle │ │ Main Headline         │ text      │
├──────────────────┼───────────────┤ ├───────────────────────┼───────────┤
│ Surface Elements │ surface *     │ │ Sub-Headlines, Labels │ subtext * │
├──────────────────┼───────────────┤ ├───────────────────────┼───────────┤
│ Overlays         │ overlay *     │ │ Subtle                │ overlay 1 │
╘══════════════════╧═══════════════╛ ├───────────────────────┼───────────┤
                                     │ Links, URLs           │ blue      │
                                     ├───────────────────────┼───────────┤
                                     │ Success               │ green     │
                                     ├───────────────────────┼───────────┤
                                     │ Warnings              │ yellow    │
                                     ├───────────────────────┼───────────┤
                                     │ Errors                │ red       │
                                     ├───────────────────────┼───────────┤
                                     │ Tags, Pills           │ blue      │
                                     ├───────────────────────┼───────────┤
                                     │ Selection Background  │ overlay 2 │
                                     ├───────────────────────┼───────────┤
                                     │ Cursor                │ rosewater │
                                     ╘═══════════════════════╧═══════════╛

This table was generated on 07.16.2024 @ 01:10 PDT

The tables provide summaries of highlight definitions in each port, including their definitions, conformity to the style guide, and additional remarks. A under the "Conformant?" column denotes a deviation from the guide, a indicates compliance with the guide, and indicates aspects not covered in the guide.

  • binary-ninja
╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                                                        binary-ninja                                                                                                                                        ║
╠═══════════════════════════════════╤════════════╤══════════════════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║               Name                │ Definition │       Conformant?        │ Remarks                                                                                                                                                                                                        ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ addressColor                      │   green    │       ✘ (Literals)       │ The guide states that literals (in this case, an address) should be in peach, but green (for strings) is used here instead. The distinction between "strings" and "literals" isn't very clear in this context. ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ modifiedColor                     │    red     │   ✘ (Changed Text BG)    │ This, along with the two that follow, is taken from the Diff & Merge section, but it might not be ideal for indicating a change in "state", nor does it define a foreground color.                             ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ insertedColor                     │    sky     │   ✘ (Inserted Text BG)   │ Refer to the comment above.                                                                                                                                                                                    ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ notPresentColor                   │    sky     │   ✘ (Removed Text BG)    │ Refer to the comment above.                                                                                                                                                                                    ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ selectionColor                    │  surface2  │ ✘ (Selection Background) │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ backgroundHighlightDarkColor      │    base    │            �             │ No color is defined for cases where background contrast is needed.                                                                                                                                             ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ backgroundHighlightLightColor     │    base    │            �             │ Refer to the comment above.                                                                                                                                                                                    ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ boldBackgroundHighlightDarkColor  │    blue    │            �             │ Refer to the comment above.                                                                                                                                                                                    ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ boldBackgroundHighlightLightColor │    red     │            �             │ Refer to the comment above.                                                                                                                                                                                    ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ alphanumericHighlightColor        │    sky     │       ✘ (Strings)        │ These are literal strings in disassembly, hence this highlight group is chosen.                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ printableHighlightColor           │   yellow   │       ✘ (Symbols)        │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ registerColor                     │    red     │       ✔ (Builtins)       │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ numberColor                       │   yellow   │       ✘ (Numbers)        │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ codeSymbolColor                   │   green    │      ✘ (Functions)       │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ dataSymbolColor                   │  lavender  │            �             │ No highlight group appears to have been assigned to nodes denoting regular "instances", variables, or identifiers in general.                                                                                  ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ stackVariableColor                │    sky     │            �             │ No highlight group seems to have been assigned to nodes denoting local variables, stack variables, or function parameters in general.                                                                          ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ importColor                       │   green    │            �             │ No color is defined for generic preprocessor statements.                                                                                                                                                       ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ instructionHighlightColor         │  surface2  │     ✘ (Cursor Line)      │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ tokenHighlightColor               │  lavender  │            �             │ No color is defined for highlighting matches. The variants of search results don't seem to be very easy to grok.                                                                                               ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ annotationColor                   │    text    │            �             │ Some editors have the ability to generate annotations. These might not be comments (e.g., inlay hints), and to the best of my knowledge no color is assigned to them.                                          ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ opcodeColor                       │  surface2  │       ✘ (Builtins)       │ There's no distinction made between function calls, constructor calls, and built-in functions.                                                                                                                 ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ stringColor                       │   yellow   │       ✘ (Strings)        │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ typeNameColor                     │    sky     │        ✘ (Types)         │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ fieldNameColor                    │    blue    │            �             │ No highlight is assigned to denote a field (or a child of an object, such as a member of a struct {}).                                                                                                         ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ keywordColor                      │   green    │       ✘ (Keyword)        │                                                                                                                                                                                                                ║
╟───────────────────────────────────┼────────────┼──────────────────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ uncertainColor                    │    sky     │            �             │ No color is assigned to variables with special syntactical meanings (for example, data with low confidence).                                                                                                   ║
╚═══════════════════════════════════╧════════════╧══════════════════════════╧════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT
  • geany
╔═══════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                               geany                                               ║
╠═════════════╤════════════╤═════════════╤══════════════════════════════════════════════════════════╣
║    Name     │ Definition │ Conformant? │ Remarks                                                  ║
╟─────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────╢
║ folded_line │    text    │      �      │ No recommendation is provided for coloring folded lines. ║
╚═════════════╧════════════╧═════════════╧══════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT
  • nvim
╔═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                                                         nvim                                                                                                                                          ║
╠═════════════════╤════════════╤═════════════╤══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║      Name       │ Definition │ Conformant? │ Remarks                                                                                                                                                                                                                                  ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Character       │    teal    │      �      │ No highlight is assigned to denote an integer character constant (e.g., 'a').                                                                                                                                                            ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Label           │ rosewater  │      �      │ Not to be confused with labels in general. This usually refers to a language feature that marks a specific place in the source code for later reference.                                                                                 ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Keyword         │   maroon   │      �      │ These are other language keywords that typically do not share the same syntax as those listed in the guide. For example, an `if()` statement usually differs in syntax from modifiers like `const`, even though both are valid keywords. ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Exception       │   peach    │      �      │ Most languages typically have special constructs for exception handling routines. Assigning a different color to such clauses could possibly improve readability and make the distinction between built-in keywords clearer.             ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Include         │    teal    │      �      │ A special preprocessor statement that typically includes other files or modules.                                                                                                                                                         ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Tag             │  lavender  │      �      │ An interactive tag that marks a specific location.                                                                                                                                                                                       ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ BuiltinConstant │  lavender  │      �      │ They are still technically constants but typically have special meanings assigned to them, such as `nil` in Lua, `nullptr` in C  , and `null` in LLVM IR.                                                                                ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Module          │ rosewater  │      �      │ They are identifiers that refer to modules and namespaces.                                                                                                                                                                               ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ DocString       │    teal    │      �      │ These are documentation strings, which usually reside inside comments but may also be in strings.                                                                                                                                        ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Regexp          │   peach    │      �      │ Special handling for regexp (constants).                                                                                                                                                                                                 ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ BuiltinFunction │   peach    │      �      │                                                                                                                                                                                                                                          ║
╟─────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ReturnKeyword   │    pink    │      �      │ The literal keyword `return`. This usually denotes special semantics in many languages, such as a change in control flow.                                                                                                                ║
╚═════════════════╧════════════╧═════════════╧══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT
  • helix & emacs
╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                      helix & emacs                                                                                                      ║
╠══════════════════════════════════════════════════╤════════════════════════════════════════════════════════╤════════════════════════════════════════════════════════╤════════════════════════════════════════════════════╣
║                       Name                       │                       Definition                       │                      Conformant?                       │ Remarks                                            ║
╟──────────────────────────────────────────────────┴────────────────────────────────────────────────────────┴────────────────────────────────────────────────────────┴────────────────────────────────────────────────────╢
║ While all of them have been mentioned before, Helix's documentation on syntax highlighting is excellent and could serve as a reference. Check out: https://docs.helix-editor.com/master/themes.html#syntax-highlighting ║
╚═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT
  • vscode
╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                                               vscode-cpp                                                                                                                                ║
╠═══════════════════════════════════════╤════════════╤═══════════════╤════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║                 Name                  │ Definition │  Conformant?  │ Remarks                                                                                                                                                                                            ║
╟───────────────────────────────────────┼────────────┼───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ storage.modifier.specifier.extern.cpp │   mauve    │  ✔ (Keyword)  │ This is quite similar to the comments on the "Keyword" highlight group for nvim. Should an "if expression" be highlighted the same way as "extern" (which itself is a keyword, not an expression)? ║
╟───────────────────────────────────────┼────────────┼───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ entity.name.scope-resolution.cpp      │   yellow   │ ✘ (Operators) │ Formally, it should be highlighted as an operator or a delimiter, but definitely not the same as classes (which are yellow).                                                                       ║
╟───────────────────────────────────────┼────────────┼───────────────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ storage.type.class.doxygen            │     NA     │       �       │ See the comments on DocString for nvim.                                                                                                                                                            ║
╚═══════════════════════════════════════╧════════════╧═══════════════╧════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                       vscode-cs                                                        ║
╠════════════════════════════════╤════════════╤═════════════╤════════════════════════════════════════════════════════════╣
║              Name              │ Definition │ Conformant? │ Remarks                                                    ║
╟────────────────────────────────┼────────────┼─────────────┼────────────────────────────────────────────────────────────╢
║ meta.interpolation.cs          │    text    │      �      │ No highlight is assigned to special tokens inside strings. ║
╟────────────────────────────────┼────────────┼─────────────┼────────────────────────────────────────────────────────────╢
║ comment.block.documentation.cs │    text    │      �      │ See the comments on DocString for nvim.                    ║
╚════════════════════════════════╧════════════╧═════════════╧════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                              vscode-html                                               ║
╠═══════════════════════════════╤════════════╤═════════════╤═════════════════════════════════════════════╣
║             Name              │ Definition │ Conformant? │ Remarks                                     ║
╟───────────────────────────────┼────────────┼─────────────┼─────────────────────────────────────────────╢
║ Special characters like & │    red     │      �      │ No highlight is assigned to special tokens. ║
╚═══════════════════════════════╧════════════╧═════════════╧═════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                               vscode-java                                                                                                                ║
╠═══════════════════════════════════╤════════════╤═════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║               Name                │ Definition │ Conformant? │ Remarks                                                                                                                                                                   ║
╟───────────────────────────────────┼────────────┼─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ punctuation.definition.annotation │   peach    │      �      │ Annotations aren't really... constants. Maybe some remarks on this or including a separate item for this property would clarify it? See the comments on Keyword for nvim. ║
╟───────────────────────────────────┼────────────┼─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ constant.other.enum.java          │    teal    │      �      │ A lack of highlight for enum members.                                                                                                                                     ║
╟───────────────────────────────────┼────────────┼─────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ storage.modifier.import.java      │    text    │      �      │ See the comments on Include for nvim.                                                                                                                                     ║
╚═══════════════════════════════════╧════════════╧═════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                             vscode-julia                                                             ║
╠══════════════════════════════╤════════════╤═══════════════════════════════════╤══════════════════════════════════════════════════════╣
║             Name             │ Definition │            Conformant?            │ Remarks                                              ║
╟──────────────────────────────┼────────────┼───────────────────────────────────┼──────────────────────────────────────────────────────╢
║ support.function.macro.julia │    teal    │ ✘ (Either Constants or Functions) │                                                      ║
╟──────────────────────────────┼────────────┼───────────────────────────────────┼──────────────────────────────────────────────────────╢
║ constant.other.symbol.julia  │   maroon   │                 �                 │ See the comments on uncertainColor for binary-ninja. ║
╚══════════════════════════════╧════════════╧═══════════════════════════════════╧══════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                   vscode-latex                                                   ║
╠═══════════════════════════════════╤════════════╤═════════════╤═══════════════════════════════════════════════════╣
║               Name                │ Definition │ Conformant? │ Remarks                                           ║
╟───────────────────────────────────┼────────────┼─────────────┼───────────────────────────────────────────────────╢
║ text.tex keyword.control.preamble │    teal    │      �      │ See the comments on DocString for nvim.           ║
╟───────────────────────────────────┼────────────┼─────────────┼───────────────────────────────────────────────────╢
║ text.tex support.function.be      │    sky     │      �      │ See the comments on opcodeColor for binary-ninja. ║
╟───────────────────────────────────┼────────────┼─────────────┼───────────────────────────────────────────────────╢
║ constant.other.general.math.tex   │  flamingo  │      �      │ No highlight is assigned to special tokens.       ║
╚═══════════════════════════════════╧════════════╧═════════════╧═══════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                       vscode-nix                                                        ║
╠═══════════════════════════════════╤════════════╤═════════════╤══════════════════════════════════════════════════════════╣
║               Name                │ Definition │ Conformant? │ Remarks                                                  ║
╟───────────────────────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────╢
║ entity.other.attribute-name.*.nix │    blue    │      �      │ Missing highlight definition for attributes.             ║
╟───────────────────────────────────┼────────────┼─────────────┼──────────────────────────────────────────────────────────╢
║ variable.parameter.name.nix       │    text    │      �      │ See the comments on stackVariableColor for binary-ninja. ║
╚═══════════════════════════════════╧════════════╧═════════════╧══════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                              vscode-python                                                              ║
╠════════════════════════════════════════════════════╤═════════════╤═══════════════╤══════════════════════════════════════════════════════╣
║                        Name                        │ Definition  │  Conformant?  │ Remarks                                              ║
╟────────────────────────────────────────────────────┼─────────────┼───────────────┼──────────────────────────────────────────────────────╢
║ support.function.magic.python                      │ sky, italic │       �       │ See the comments on opcodeColor for binary-ninja.    ║
╟────────────────────────────────────────────────────┼─────────────┼───────────────┼──────────────────────────────────────────────────────╢
║ variable.language.special.self.python              │     red     │       �       │ See the comments on BuiltinConstant for nvim.        ║
╟────────────────────────────────────────────────────┼─────────────┼───────────────┼──────────────────────────────────────────────────────╢
║ constant.character.format.placeholder.other.python │    pink     │       �       │ No highlight is assigned to special tokens.          ║
╟────────────────────────────────────────────────────┼─────────────┼───────────────┼──────────────────────────────────────────────────────╢
║ constant.language.python                           │    mauve    │ ✘ (Constants) │                                                      ║
╟────────────────────────────────────────────────────┼─────────────┼───────────────┼──────────────────────────────────────────────────────╢
║ meta.indexed-name.python                           │   maroon    │       �       │ See the comments on fieldNameColor for binary-ninja. ║
╚════════════════════════════════════════════════════╧═════════════╧═══════════════╧══════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔════════════════════════════════════════════════════════════════════════════╗
║                                vscode-regex                                ║
╠══════════╤════════════╤═════════════╤══════════════════════════════════════╣
║   Name   │ Definition │ Conformant? │ Remarks                              ║
╟──────────┼────────────┼─────────────┼──────────────────────────────────────╢
║ *.regexp │ variegated │      �      │ See the comments on Regexp for nvim. ║
╚══════════╧════════════╧═════════════╧══════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                                                              vscode-rust                                                                                                                              ║
╠══════════════════════╤════════════════╤═════════════╤═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╣
║         Name         │   Definition   │ Conformant? │ Remarks                                                                                                                                                                                                         ║
╟──────────────────────┼────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ meta.annotation.rust │ yellow, italic │      �      │ Missing highlight definition for attributes.                                                                                                                                                                    ║
╟──────────────────────┼────────────────┼─────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Other                │   variegated   │      �      │ The Rust syntax highlighting seems to deviate quite a bit from the style guide. For instance, why does catppuccin highlight types like i32 as keywords? Are there specific design decisions behind this choice? ║
╚══════════════════════╧════════════════╧═════════════╧═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

---

╔═════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║                                                                                   vscode                                                                                    ║
╠════════════════════════════════╤════════════╤═══════════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════╣
║              Name              │ Definition │        Conformant?        │ Remarks                                                                                           ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ entity.name.tag.documentation  │   mauve    │             �             │ See the comments on Tag for nvim.                                                                 ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ Punctuation                    │    teal    │             �             │ Punctuation and delimiters don't seem to have consistent colors across different implementations. ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ keyword.control.directive      │   yellow   │             �             │ See the comments on importColor for binary-ninja.                                                 ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ entity.name.namespace          │   yellow   │ ✘ (Definitely not a type) │ See the comments on Module for nvim.                                                              ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ support.type.property-name.css │    blue    │             �             │ See the comments on uncertainColor for binary-ninja.                                              ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ variable.language.this         │    red     │             �             │ See the comments on BuiltinConstant for nvim.                                                     ║
╟────────────────────────────────┼────────────┼───────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────╢
║ keyword.operator.new           │    bold    │            NA             │ Why isn't `keyword.operator.delete` also formatted in bold?                                       ║
╚════════════════════════════════╧════════════╧═══════════════════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════════╝

This table was generated on 07.16.2024 @ 01:10 PDT

Here's a summary of those remarks:

  1. The distinction between "strings" and "literals" is unclear in some contexts.
  2. The current color definition for document diffs (taken from the Diff & Merge section) may not effectively indicate a change in "state" and does not define a foreground color.
  3. No color is defined for cases where background contrast is needed.
  4. Some editors have the ability to generate annotations. These might not be comments (e.g., inlay hints), and to the best of my knowledge no color is assigned to them.
  5. No distinction is made between function calls, constructor calls, and built-in functions.
  6. There's no recommendation for coloring folded lines.
  7. Additional language keywords have different syntax from those listed in the guide, yet share the same coloring.
  8. Most languages typically have special constructs for exception handling routines. Assigning a different color to such clauses could possibly improve readability and make the distinction between built-in keywords clearer.
  9. Rust syntax highlighting diverges significantly from the style guide, like highlighting types (e.g., i32) as keywords.
  10. Inconsistent colors for punctuation and delimiters across implementations.
  11. Missing highlight definitions for various nodes:
  • Regular instances, variables, or identifiers
  • Local and stack variables, function parameters
  • Generic preprocessor statements
  • Fields or child objects (e.g., struct members)
  • Integer character constants (e.g., 'a')
  • Labels
  • Variables with special syntactical meanings
  • Matches and search result variants
  • Special preprocessor statements including other files/modules
  • Interactive tags marking specific locations
  • Built-in constants like nil, nullptr, null
  • Identifiers for modules and namespaces
  • Documentation strings within comments or strings
  • Regular expressions
  • The literal keyword return
  • Special tokens inside strings
  • Annotations and attributes
  • Enum members

And I've found that Helix's documentation on syntax highlighting is excellent and could serve as a valuable reference too! Check it out here: https://docs.helix-editor.com/master/themes.html#syntax-highlighting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting on author Waiting on action from the maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants