Gedit
This project provides GDScript syntax highlighting support for the Gedit text editor and other editors based on the gtksourceview library. It allows for improved readability and code editing experience when working with GDScript files.
https://github.com/haimat/GDScript-geditGDScript Syntax Highlighting for Gedit
This repository contains the GDScript syntax definition file for the Gedit text editor. GDScript is the scripting language used in the Godot Game Engine. This setup enhances the code editing experience by providing syntax highlighting, making GDScript code more readable and easier to manage.
Installation
To install the language specification file, you'll need to place the gdscript.lang
file in the appropriate directory, depending on whether you want a user-specific or system-wide installation. For user-specific installation, create the directory ~/.local/share/gtksourceview-2.0/language-specs
or ~/.local/share/gtksourceview-3.0/language-specs
(depending on your Gtk version) and copy the file there. For system-wide installation, place the file in /usr/share/gtksourceview-{2|3}.0/language-specs
.
MIME Type Configuration
To enable automatic recognition of GDScript files by Gedit, you'll need to configure the MIME type. Create a file named gdscript.xml
with the provided content, specifying the text/x-gdscript
MIME type and associating it with the .gd
file extension. Place this file in ~/.local/share/mime/packages
for user-specific configuration or /usr/share/mime/packages
for system-wide. After placing the XML file, update the MIME database using the command update-mime-database /path/to/the/xml/file
.
Godot Integration
Finally, configure Godot to use Gedit as the external editor. In Godot's Editor Settings, under the External Editor options, specify the path to the Gedit executable and enable the "Use External Editor" option. This will allow you to open GDScript files directly from within the Godot editor in Gedit.