GDScript v1.0
Godot Theme v1.0
GDScript language definition and theme for André Simon’s Highlight tool:
By Tristano Ajmone (2017/02/16). Released under the public domain according to the Unlicense license terms (with the exception of the third party GDScript sample code, used for testing purposes, which is MIT licensed).
Also contains an /extras/
folder with dev-notes and resources for porting GDScript syntax or Godot theme to other libraries.
NOTE: Both the GDScript language definition and theme are now part of the Highlight bundle since version 3.35 (2017-02-28).
Project home:
This repository contains the GDScript language definition file for Highlight tool, plus a theme mimicking Godot’s native editor default theme:
gdscript.lang
— The GDScript lang definition file.edit-godot.theme
— Godot Theme.
Here’s a screenshot of how GDScript code is rendered in Highlight GUI’ preview:
And this is a screenshot of the same code in Godot’s editor:
There’s also an html converted example file of the source seen in the above screenshot. For a live preview in GitHub, click on this link.
NOTE: The code in the above examples was taken from the Godot’s demo-projects repository:
/misc/tween/main.gd
— (c) by J.Linietsky and A.Manzur, MIT License.
NOTE: The official release of Highlight version >= 3.35 (2017-02-28) already contains the GDScript language definition and theme, so you don’t need to manually install them.
The following instructions might be useful if you plan to make changes to the GDScript language definition or theme.
Highlight/langDefs/gdscript.lang <= copy file to here
Highlight/themes/edit-godot.theme <= copy file to here
Highlight/filetypes.conf <= edit file
Highlight/gui_files/ext/fileopenfilter.conf <= edit file
Copy “gdscript.lang
” in Highlight’s “langDefs
” folder, and “edit-godot.theme
” in the “themes
” folder.
Open Highlight’s “filetypes.conf
” file in a text editor and add the following line somewhere before the closing bracket (}
) at the end of the file:
{ Lang="gdscript", Extensions={"gd"} },
Edit the “fileopenfilter.conf
” file found in Highlight’s “gui_files/ext/
” folder, and add the following line:
GDScript (*.gd)
… the last two changes will associate the “*.gd
” file extension with GDScript syntax. For more info, see:
In the /extras/
folder you will also find some developer-notes and resources useful if you are planning to update this project or to create a GDScript language definition for another syntax highlighting tool/library, or porting the Godot theme.
The resouces also include Godot editor’s default theme palette in different file formats, with comments on how to use the palette.
Whilst this project is public domain, the /extras/
folder contains third party code used for testing GDScript:
/extras/example.gd
/extras/example.html
(html conversion of the above)
That code is copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur; released under MIT License. Taken from Godot’s demo-projects: /misc/tween/main.gd
and renamed to example.gd
, then converted to HTML. For more info see the /extras/README.md
file.
I’d like to maintain here a list of syntax highlighter tools and code editors supporting GDScript. If you know resources missing in this list, please contribute a link to them via pull request or by opening an issue.
A list of syntax highlighter tools supporting GDScript.
GitHub reckognizes and highlights GDScript code in its previews via the Linguist library. Linguist relies on the GDScript-sublime package to highlight GDSCript.
A list of code editors supporting GDScript, either natively or through third party packages.
- https://github.com/beefsack/GDScript-sublime
- https://packagecontrol.io/packages/GDScript%20(Godot%20Engine)
Godot Engine GDScript syntax highlighting for Sublime Text (ST2/ST3), contributed by Michael Alexander @beefsack.
GDScript grammar and completions for the free and open source Atom editor, contributed by @IndicaInkwell.