diff --git a/syntaxes/GDScript.tmLanguage.json b/syntaxes/GDScript.tmLanguage.json index 2eac23ed2..2d2f65932 100644 --- a/syntaxes/GDScript.tmLanguage.json +++ b/syntaxes/GDScript.tmLanguage.json @@ -61,6 +61,7 @@ { "include": "#operators" }, { "include": "#lambda_declaration" }, { "include": "#class_declaration" }, + { "include": "#variable_declaration_name" }, { "include": "#variable_declaration" }, { "include": "#signal_declaration_bare" }, { "include": "#signal_declaration" }, @@ -332,6 +333,14 @@ { "include": "#keywords" } ] }, + "variable_declaration_name": { + "name": "meta.variable.declaration.name.gdscript", + "begin": "(?<=\\b(var|const)\\s+)", + "end": "(?!\\s*:=)(?!\\w*)|([A-Za-z_]\\w*)", + "patterns": [ + { "include": "#any_variable" } + ] + }, "getter_setter_godot4": { "patterns": [ { @@ -444,7 +453,7 @@ ] }, "annotations": { - "match": "(@)(export|export_group|export_color_no_alpha|export_custom|export_dir|export_enum|export_exp_easing|export_file|export_flags|export_flags_2d_navigation|export_flags_2d_physics|export_flags_2d_render|export_flags_3d_navigation|export_flags_3d_physics|export_flags_3d_render|export_global_dir|export_global_file|export_multiline|export_node_path|export_placeholder|export_range|export_storage|icon|onready|rpc|tool|warning_ignore|static_unload)\\b", + "match": "(@)(export|export_group|export_color_no_alpha|export_custom|export_dir|export_enum|export_exp_easing|export_tool_button|export_file|export_flags|export_flags_2d_navigation|export_flags_2d_physics|export_flags_2d_render|export_flags_3d_navigation|export_flags_3d_physics|export_flags_3d_render|export_global_dir|export_global_file|export_multiline|export_node_path|export_placeholder|export_range|export_storage|icon|onready|rpc|tool|warning_ignore|static_unload)\\b", "captures": { "1": { "name": "entity.name.function.decorator.gdscript" }, "2": { "name": "entity.name.function.decorator.gdscript" } @@ -688,3 +697,4 @@ } } } +