Add syntax highlighting for GDScript (.gd) and GDShader (.gdshader) #2925
Camisole opened 3 days ago

Hi!

When browsing or reviewing Godot project files (.gd and .gdshader) in OneDev, they currently render as plain text without syntax highlighting. It would be an awesome quality-of-life improvement if we could get support for Godot files!

If it helps, GDQuest maintains a Lezer parser specifically for CodeMirror here: https://github.com/GDQuest/gdscript-lezer-grammar

Alternatively, even just mapping .gd files to the standard Python syntax highlighter as a fallback would work pretty well as a quick fix, since the two languages share a very similar structure, and .gdshader to C, C++, or GLSL highlighters works great as a fallback given its C-like shader syntax.

Thanks for all your hard work on OneDev!

1/1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-2925
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover