summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/doc_classes
diff options
context:
space:
mode:
authorpassivestar <60579014+passivestar@users.noreply.github.com>2024-08-18 22:40:24 +0400
committerpassivestar <60579014+passivestar@users.noreply.github.com>2024-08-19 16:36:55 +0400
commit3fe644de86b6a9fa96bbbbaa7746c52005848d96 (patch)
treec7b62145ce14316717fd2a6d0ececb69a30678e1 /modules/gdscript/doc_classes
parent1bd740d18d714f815486b04bf4c6154ef6c355d9 (diff)
downloadredot-engine-3fe644de86b6a9fa96bbbbaa7746c52005848d96.tar.gz
Expose GDScript syntax highlighter to editor plugins
Diffstat (limited to 'modules/gdscript/doc_classes')
-rw-r--r--modules/gdscript/doc_classes/GDScriptSyntaxHighlighter.xml23
1 files changed, 23 insertions, 0 deletions
diff --git a/modules/gdscript/doc_classes/GDScriptSyntaxHighlighter.xml b/modules/gdscript/doc_classes/GDScriptSyntaxHighlighter.xml
new file mode 100644
index 0000000000..63a9222901
--- /dev/null
+++ b/modules/gdscript/doc_classes/GDScriptSyntaxHighlighter.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="GDScriptSyntaxHighlighter" inherits="EditorSyntaxHighlighter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../doc/class.xsd">
+ <brief_description>
+ A GDScript syntax highlighter that can be used with [TextEdit] and [CodeEdit] nodes.
+ </brief_description>
+ <description>
+ [b]Note:[/b] This class can only be used for editor plugins because it relies on editor settings.
+ [codeblocks]
+ [gdscript]
+ var code_preview = TextEdit.new()
+ var highlighter = GDScriptSyntaxHighlighter.new()
+ code_preview.syntax_highlighter = highlighter
+ [/gdscript]
+ [csharp]
+ var codePreview = new TextEdit();
+ var highlighter = new GDScriptSyntaxHighlighter();
+ codePreview.SyntaxHighlighter = highlighter;
+ [/csharp]
+ [/codeblocks]
+ </description>
+ <tutorials>
+ </tutorials>
+</class>