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

more catppuccin treesitter coloring #7

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 38 additions & 2 deletions template.hbr
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ players:
{{/each}}
],
"syntax": {
{{!-- https://github.com/catppuccin/nvim/blob/56fb98218d22d5c326387bf9e4076227e7372e6b/lua/catppuccin/groups/integrations/treesitter.lua#L15 --}}
"attribute": {
"color": "#{{yellow}}",
"font_style": null,
Expand All @@ -189,6 +190,11 @@ players:
"font_style": null,
"font_weight": null
},
"constant.builtin": {
"color": "#{{peach}}",
"font_style": null,
"font_weight": null
},
"constructor": {
"color": "#{{blue}}",
"font_style": null,
Expand Down Expand Up @@ -224,6 +230,11 @@ players:
"font_style": null,
"font_weight": null
},
"module": {
"color": "#{{lavender}}",
"font_style": "italic",
"font_weight": null
},

Choose a reason for hiding this comment

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

We've moved away from lavender while defining the newer style guide, I'd be curious how VSCode highlights modules - I'd imagine its yellow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is indeed yellow!
image

"number": {
"color": "#{{peach}}",
"font_style": null,
Expand Down Expand Up @@ -275,7 +286,7 @@ players:
"font_weight": null
},
"string.regex": {
"color": "#{{pink}}",
"color": "#{{peach}}",
"font_style": null,
"font_weight": null
},
Copy link

@sgoudham sgoudham Mar 25, 2024

Choose a reason for hiding this comment

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

This should stay pink as per updates in VSCode

Choose a reason for hiding this comment

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

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 (catppuccin/vscode#263)

catppuccin/catppuccin#2109 (comment)

Expand All @@ -289,6 +300,11 @@ players:
"font_style": null,
"font_weight": null
},
"string.special.symbol": {
"color": "#{{rosewater}}",
"font_style": "italic",
"font_weight": null
},
Comment on lines +303 to +307

Choose a reason for hiding this comment

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

We've moved away from rosewater in the newer style guide too, I'm curious how VSCode highlights these?

Choose a reason for hiding this comment

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

We had some discussion about this on the discord, will update the style guide soon but this should now be peach

The reasoning being that these symbols are usually immutable/constants in languages

Suggested change
"string.special.symbol": {
"color": "#{{rosewater}}",
"font_style": "italic",
"font_weight": null
},
"string.special.symbol": {
"color": "#{{peach}}",
"font_style": "italic",
"font_weight": null
},

"tag": {
"color": "#{{blue}}",
"font_style": null,
Expand All @@ -299,14 +315,34 @@ players:
"font_style": null,
"font_weight": null
},
"title": {
"color": "#{{text}}",
"font_style": null,
"font_weight": 800
},
"type": {
"color": "#{{yellow}}",
"font_style": "italic",
"font_weight": null
},
"variable": {
"color": "#{{text}}",
"font_style": "italic",
"font_style": null,
"font_weight": null
},
"variable.builtin": {
"color": "#{{red}}",
"font_style": null,
"font_weight": null
},
"variable.parameter": {
"color": "#{{maroon}}",
"font_style": null,
"font_weight": null
},
"variable.member": {
"color": "#{{lavender}}",
"font_style": null,
"font_weight": null
},
Comment on lines +343 to 347

Choose a reason for hiding this comment

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

Same as above.

Choose a reason for hiding this comment

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

Looks like treesitter describes this as:

@variable.member             ; object and struct fields

and in VSCode / JetBrains, we kept this as text:

image

so this should kept as text

Suggested change
"variable.member": {
"color": "#{{lavender}}",
"font_style": null,
"font_weight": null
},
"variable.member": {
"color": "#{{text}}",
"font_style": null,
"font_weight": null
},

"variable.special": {
Expand Down
Loading