Up to date

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

SyntaxHighlighter

Inherits: Resource < RefCounted < Object

Inherited By: CodeHighlighter, EditorSyntaxHighlighter

Base class for syntax highlighters. Provides syntax highlighting data to a TextEdit.

Description

Base class for syntax highlighters. Provides syntax highlighting data to a TextEdit. The associated TextEdit will call into the SyntaxHighlighter on an as-needed basis.

Note: A SyntaxHighlighter instance should not be used across multiple TextEdit nodes.

Methods

void

_clear_highlighting_cache ( ) virtual

Dictionary

_get_line_syntax_highlighting ( int line ) virtual const

void

_update_cache ( ) virtual

void

clear_highlighting_cache ( )

Dictionary

get_line_syntax_highlighting ( int line )

TextEdit

get_text_edit ( ) const

void

update_cache ( )


Method Descriptions

void _clear_highlighting_cache ( ) virtual

Virtual method which can be overridden to clear any local caches.


Dictionary _get_line_syntax_highlighting ( int line ) virtual const

Virtual method which can be overridden to return syntax highlighting data.

See get_line_syntax_highlighting for more details.


void _update_cache ( )