Skip to content

Conversation

Qubus0
Copy link

@Qubus0 Qubus0 commented Aug 19, 2025

we've recently updated the gdscript lexer for our own documentation, this is a port of those changes to fit the godot docs

please check as many pages as you can for errors i might have missed.

also let me know if the colors are fine like this. i think some of the existing colors may be from an older theme and not quite up to date, but i didn't touch them for now.

main changes are functions having proper blue color now, global functions being purple, all classes getting the correct greens (including builtins and types having the different green), and proper colors for $String, string names and node paths

@Qubus0 Qubus0 changed the title expands the pygments lexer to cover GDScript 2 better Improve the pygments lexer to cover GDScript 2 better Aug 19, 2025
@Qubus0
Copy link
Author

Qubus0 commented Aug 19, 2025

Side by side screenshot image LexerUpdate2 LexerUpdate3

@AThousandShips AThousandShips added enhancement content:website Issues related to adding website features and fixing bugs, whether on the front or back-end labels Aug 19, 2025
@AThousandShips AThousandShips requested a review from a team August 19, 2025 16:20
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Tested locally, it works as expected. Both dark and light theme seem to work.

image image

This is a great start, as it now looks much closer to the Godot script editor (which is the intended goal).

@Qubus0
Copy link
Author

Qubus0 commented Aug 20, 2025

Name and Punctuation didn't have css classes yet. adding them makes the () and = bluish, pretty hard to notice, and fixes code in warning callouts being yellow

image

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

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

Looks great now!

Dark Light
Screenshot_20250829_225651 Screenshot_20250829_225706

I can confirm the code color in admonitions is fixed now.

@Qubus0 Qubus0 force-pushed the better-pygments-gdscript branch from f1ddeff to eafb19b Compare August 31, 2025 14:13
@Qubus0
Copy link
Author

Qubus0 commented Aug 31, 2025

singulars done, squashed everything, should be ready - let me know if anything else stands out to you

@Qubus0 Qubus0 force-pushed the better-pygments-gdscript branch from eafb19b to 6c5997c Compare August 31, 2025 14:51
@Qubus0 Qubus0 force-pushed the better-pygments-gdscript branch 2 times, most recently from 85a8f8c to b5740a5 Compare August 31, 2025 15:36
@Qubus0
Copy link
Author

Qubus0 commented Aug 31, 2025

okay, realized most of the light theme colors were outdated, so i brought everything closer to the editor theme. including the yellowed background which the editor doesn't have (improves clarity imo, might split some opinions though)

before after
image image

@Qubus0
Copy link
Author

Qubus0 commented Aug 31, 2025

Updated preview

dark light
image image
note the function declaration colors above are fixed but everything below still has the wrong ones but i didn't want to redo everything
image image
image image
image image
image image

@Qubus0 Qubus0 force-pushed the better-pygments-gdscript branch 2 times, most recently from 251b197 to eca6d94 Compare September 1, 2025 15:07
@Qubus0
Copy link
Author

Qubus0 commented Sep 1, 2025

fixed member vars color and ...args

dark light
image image

code not changed, just added for simpler screenshot

@Qubus0 Qubus0 force-pushed the better-pygments-gdscript branch from eca6d94 to 84b6484 Compare September 2, 2025 12:28
@Qubus0 Qubus0 force-pushed the better-pygments-gdscript branch from 84b6484 to 5ebeb22 Compare September 2, 2025 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:website Issues related to adding website features and fixing bugs, whether on the front or back-end enhancement topic:gdscript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants