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

more catppuccin treesitter coloring #7

wants to merge 5 commits into from

Conversation

tecandrew
Copy link
Collaborator

  • add more catppuccin colored treesitter syntax (from vim/neovim)
  • more coloring definitions
  • fix some minor visual bugs

@tecandrew tecandrew changed the title more treesitter syntax more catppuccin treesitter coloring Mar 25, 2024
template.hbr Outdated
Comment on lines 233 to 237
"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

template.hbr Outdated
Comment on lines 288 to 292
"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)

Comment on lines +303 to +307
"string.special.symbol": {
"color": "#{{rosewater}}",
"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 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
},

Comment on lines +343 to 347
"variable.member": {
"color": "#{{lavender}}",
"font_style": null,
"font_weight": null
},

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
},

Comment on lines +343 to 347
"variable.member": {
"color": "#{{lavender}}",
"font_style": null,
"font_weight": null
},

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
},

Comment on lines +303 to +307
"string.special.symbol": {
"color": "#{{rosewater}}",
"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 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
},

@tecandrew
Copy link
Collaborator Author

will open another PR another time to update these, since this is a bit out of date already 🫡

@tecandrew tecandrew closed this Apr 30, 2024
@tecandrew tecandrew deleted the treesitter branch May 1, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants