Up to date

This page is up to date for Godot 4.3. If you still find outdated information, please open an issue.

GDScriptSyntaxHighlighter

Inherits: EditorSyntaxHighlighter < SyntaxHighlighter < Resource < RefCounted < Object

A GDScript syntax highlighter that can be used with TextEdit and CodeEdit nodes.

Description

Note: This class can only be used for editor plugins because it relies on editor settings.

var code_preview = TextEdit.new()
var highlighter = GDScriptSyntaxHighlighter.new()
code_preview.syntax_highlighter = highlighter