Created
October 7, 2025 01:55
-
-
Save CodeZombie/7c6b97fed675abead8200b4019edc64c to your computer and use it in GitHub Desktop.
Godot Dialogue Manager VSCode Syntax Highlighting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | |
| "name": "Dialogue", | |
| "scopeName": "text.dialogue", | |
| "patterns": [ | |
| { "include": "#comment" }, | |
| { "include": "#title" }, | |
| { "include": "#import" }, | |
| { "include": "#using" }, | |
| { "include": "#conditional" }, | |
| { "include": "#mutation" }, | |
| { "include": "#random" }, | |
| { "include": "#dialogue_line" } | |
| ], | |
| "repository": { | |
| "comment": { | |
| "name": "comment.line.number-sign.dialogue", | |
| "match": "^\\s*#.*" | |
| }, | |
| "title": { | |
| "name": "markup.heading.dialogue", | |
| "match": "^~.*" | |
| }, | |
| "import": { | |
| "begin": "^\\s*(import)\\s+", | |
| "beginCaptures": { | |
| "1": { "name": "keyword.control.import.dialogue" } | |
| }, | |
| "end": "$", | |
| "patterns": [ | |
| { "include": "#string_double" }, | |
| { "match": "\\bas\\b", "name": "keyword.control.import.dialogue" } | |
| ] | |
| }, | |
| "using": { | |
| "match": "^\\s*(using)\\s+.*", | |
| "captures": { | |
| "1": { "name": "keyword.control.import.dialogue" } | |
| } | |
| }, | |
| "conditional": { | |
| "begin": "^\\s*(if|while|match|when|else)\\s+", | |
| "beginCaptures": { | |
| "1": { "name": "keyword.control.conditional.dialogue" } | |
| }, | |
| "end": "(?=$)", | |
| "patterns": [{ "include": "#expression" }] | |
| }, | |
| "mutation": { | |
| "begin": "^\\s*(do|set)\\s+", | |
| "beginCaptures": { | |
| "1": { "name": "keyword.other.mutation.dialogue" } | |
| }, | |
| "end": "(?=$)", | |
| "patterns": [{ "include": "#expression" }] | |
| }, | |
| "random": { | |
| "match": "^\\s*\\*.*", | |
| "name": "keyword.operator.random.dialogue" | |
| }, | |
| "dialogue_line": { | |
| "patterns": [ | |
| { "include": "#character_name" }, | |
| { "include": "#interpolation" }, | |
| { "include": "#bbcode_tags" }, | |
| { "include": "#goto" } | |
| ] | |
| }, | |
| "character_name": { | |
| "name": "entity.name.function.character.dialogue", | |
| "match": "^\\s*[\\w\\s]+(?=:)" | |
| }, | |
| "goto": { | |
| "begin": "(=>|=>\\<)\\s*", | |
| "beginCaptures": { "1": { "name": "keyword.control.flow.dialogue" } }, | |
| "end": "(?=$)", | |
| "patterns": [ | |
| { "match": "[\\w_]+", "name": "entity.name.tag.goto.dialogue" }, | |
| { "include": "#interpolation" } | |
| ] | |
| }, | |
| "interpolation": { | |
| "begin": "{{", | |
| "end": "}}", | |
| "name": "meta.embedded.expression.dialogue", | |
| "beginCaptures": { "0": { "name": "punctuation.definition.tag.begin.dialogue" } }, | |
| "endCaptures": { "0": { "name": "punctuation.definition.tag.end.dialogue" } }, | |
| "patterns": [{ "include": "#expression" }] | |
| }, | |
| "bbcode_tags": { | |
| "begin": "\\[", | |
| "end": "\\]", | |
| "name": "meta.tag.bbcode.dialogue", | |
| "beginCaptures": { "0": { "name": "punctuation.definition.tag.begin.dialogue" } }, | |
| "endCaptures": { "0": { "name": "punctuation.definition.tag.end.dialogue" } }, | |
| "patterns": [ | |
| { "match": "\\|", "name": "punctuation.separator.pipe.dialogue" }, | |
| { | |
| "match": "\\$>(do|set|if)|/if|else", | |
| "name": "keyword.control.inline.dialogue" | |
| }, | |
| { "include": "#expression" } | |
| ] | |
| }, | |
| "expression": { | |
| "patterns": [ | |
| { "include": "#comment" }, | |
| { "include": "#string_double" }, | |
| { "include": "#string_single" }, | |
| { "include": "#boolean" }, | |
| { "include": "#number" }, | |
| { "include": "#keyword_logical" }, | |
| { "include": "#variable" }, | |
| { "include": "#operator" } | |
| ] | |
| }, | |
| "string_double": { | |
| "name": "string.quoted.double.dialogue", | |
| "begin": "\"", | |
| "end": "\"" | |
| }, | |
| "string_single": { | |
| "name": "string.quoted.single.dialogue", | |
| "begin": "'", | |
| "end": "'" | |
| }, | |
| "boolean": { | |
| "name": "constant.language.boolean.dialogue", | |
| "match": "\\b(true|false)\\b" | |
| }, | |
| "number": { | |
| "name": "constant.numeric.dialogue", | |
| "match": "\\b[0-9]+(\\.[0-9]+)?\\b" | |
| }, | |
| "keyword_logical": { | |
| "name": "keyword.operator.logical.dialogue", | |
| "match": "\\b(and|or|not)\\b" | |
| }, | |
| "variable": { | |
| "name": "variable.other.dialogue", | |
| "match": "[a-zA-Z_][a-zA-Z0-9_]*" | |
| }, | |
| "operator": { | |
| "name": "keyword.operator.dialogue", | |
| "match": "[+\\-*/%&|=!<>?:,.]+" | |
| } | |
| } | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Godot Dialogue Manager VSCode Syntax Highlighting