Up to date

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

CodeHighlighter

Inherits: SyntaxHighlighter < Resource < RefCounted < Object

A syntax highlighter intended for code.

Description

By adjusting various properties of this resource, you can change the colors of strings, comments, numbers, and other text patterns inside a TextEdit control.

Properties

Dictionary

color_regions

{}

Color

function_color

Color(0, 0, 0, 1)

Dictionary

keyword_colors

{}

Dictionary

member_keyword_colors

{}

Color

member_variable_color

Color(0, 0, 0, 1)

Color

number_color

Color(0, 0, 0, 1)

Color

symbol_color

Color(0, 0, 0, 1)

Methods

void

add_color_region ( String start_key, String end_key, Color color, bool line_only=false )

void

add_keyword_color ( String keyword, Color color )

void

add_member_keyword_color ( String member_keyword, Color color )

void

clear_color_regions ( )

void