From 44f0b5ea81acddbbdf06b36844ad7a0d833bf113 Mon Sep 17 00:00:00 2001 From: duckdoom4 <60387522+duckdoom4@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:53:03 +0200 Subject: [PATCH] Prettier formatting on json files was annoying me Changed to use the build in formatter Updated all json files to new formatting --- .vscode/extensions.json | 2 +- .vscode/launch.json | 14 +- .vscode/settings.json | 10 +- .vscode/tasks.json | 2 +- examples/.vscode/settings.json | 2 +- language-configuration.json | 62 ++++---- package-lock.json | 14 +- package.json | 10 +- snippets/snippets.json | 2 +- syntaxes/log.injection.json | 10 +- syntaxes/old.renpy.tmLanguage.json | 110 ++++++------- syntaxes/renpy.atl.tmLanguage.json | 36 ++--- syntaxes/renpy.python.tmLanguage.json | 220 +++++++++++++------------- syntaxes/renpy.screen.tmLanguage.json | 16 +- syntaxes/renpy.tmLanguage.json | 194 +++++++++++------------ 15 files changed, 345 insertions(+), 359 deletions(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index b9b84954..e77304bd 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,5 +1,5 @@ { // See http://go.microsoft.com/fwlink/?LinkId=827846 // for the documentation about the extensions.json format - "recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "ms-vscode.vscode-js-profile-flame"] + "recommendations": [ "dbaeumer.vscode-eslint", "esbenp.prettier-vscode", "ms-vscode.vscode-js-profile-flame" ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index c6210f6a..bd4adadd 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -14,9 +14,9 @@ "--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/examples" // open examples directory ], - "outFiles": ["${workspaceFolder}/dist/**/*.js"], + "outFiles": [ "${workspaceFolder}/dist/**/*.js" ], "preLaunchTask": "npm: watch", - "skipFiles": ["/**", "**/extensions/git*/**", "**/node_modules/prettier/**", "**/node/extensionHostProcess.js"] + "skipFiles": [ "/**", "**/extensions/git*/**", "**/node_modules/prettier/**", "**/node/extensionHostProcess.js" ] }, { "name": "Launch Extension (Release)", @@ -27,19 +27,19 @@ "--extensionDevelopmentPath=${workspaceFolder}", "${workspaceFolder}/examples" // open examples directory ], - "outFiles": ["${workspaceFolder}/dist/**/*.js"], + "outFiles": [ "${workspaceFolder}/dist/**/*.js" ], "preLaunchTask": "npm: watch-release", - "skipFiles": ["/**", "**/extensions/git*/**", "**/node_modules/prettier/**"] + "skipFiles": [ "/**", "**/extensions/git*/**", "**/node_modules/prettier/**" ] }, { "name": "Extension Tests", "type": "extensionHost", "request": "launch", "runtimeExecutable": "${execPath}", - "args": ["--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test"], - "outFiles": ["${workspaceFolder}/out/test/**/*.js"], + "args": [ "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test" ], + "outFiles": [ "${workspaceFolder}/out/test/**/*.js" ], "preLaunchTask": "npm: test-compile", - "skipFiles": ["/**", "**/extensions/git*/**", "**/node_modules/prettier/**"] + "skipFiles": [ "/**", "**/extensions/git*/**", "**/node_modules/prettier/**" ] } ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index eefb303f..971e2696 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -14,11 +14,14 @@ "editor.formatOnPaste": false, "editor.formatOnSave": true, + "json.format.enable": true, + "json.format.keepLines": true, + "[jsonc]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "vscode.json-language-features" }, "[json]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "vscode.json-language-features" }, "[python]": { "editor.defaultFormatter": "esbenp.prettier-vscode" @@ -35,7 +38,8 @@ "Ren'Py", "rpyc", "Uncompiled" - ] + ], + "editor.tokenColorCustomizations": { "[*Light*]": { "textMateRules": [ diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 43139e84..3ee4695b 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -120,7 +120,7 @@ "type": "npm", "script": "lint", "group": "build", - "problemMatcher": ["$eslint-stylish"] + "problemMatcher": [ "$eslint-stylish" ] } ] } diff --git a/examples/.vscode/settings.json b/examples/.vscode/settings.json index c885f64a..cf1dda83 100644 --- a/examples/.vscode/settings.json +++ b/examples/.vscode/settings.json @@ -32,7 +32,7 @@ } }, { - "scope": ["renpy.meta.u", "renpy.meta.a"], + "scope": [ "renpy.meta.u", "renpy.meta.a" ], "settings": { "fontStyle": "underline" } diff --git a/language-configuration.json b/language-configuration.json index 6de3bba9..ce7f53b2 100644 --- a/language-configuration.json +++ b/language-configuration.json @@ -2,13 +2,13 @@ "comments": { // symbol used for single line comment. Remove this entry if your language does not support line comments "lineComment": "#", - "blockComment": ["\"\"\"", "\"\"\""] + "blockComment": [ "\"\"\"", "\"\"\"" ] }, // symbols used as brackets "brackets": [ - ["{", "}"], - ["[", "]"], - ["(", ")"] + [ "{", "}" ], + [ "[", "]" ], + [ "(", ")" ] ], // symbols that are auto closed when typing "autoClosingPairs": [ @@ -16,39 +16,39 @@ { "open": "[", "close": "]" }, { "open": "(", "close": ")" }, - { "open": "\"", "close": "\"", "notIn": ["string"] }, - { "open": "r\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "R\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "u\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "U\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "f\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "F\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "b\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "B\"", "close": "\"", "notIn": ["string", "comment"] }, + { "open": "\"", "close": "\"", "notIn": [ "string" ] }, + { "open": "r\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "R\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "u\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "U\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "f\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "F\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "b\"", "close": "\"", "notIn": [ "string", "comment" ] }, + { "open": "B\"", "close": "\"", "notIn": [ "string", "comment" ] }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "r'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "R'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "u'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "U'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "f'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "F'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "b'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "B'", "close": "'", "notIn": ["string", "comment"] }, + { "open": "'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "r'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "R'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "u'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "U'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "f'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "F'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "b'", "close": "'", "notIn": [ "string", "comment" ] }, + { "open": "B'", "close": "'", "notIn": [ "string", "comment" ] }, - { "open": "`", "close": "`", "notIn": ["string", "comment"] }, + { "open": "`", "close": "`", "notIn": [ "string", "comment" ] }, - { "open": "\"\"\"", "close": "\"\"\"", "notIn": ["string"] } + { "open": "\"\"\"", "close": "\"\"\"", "notIn": [ "string" ] } ], // symbols that that can be used to surround a selection "surroundingPairs": [ - ["{", "}"], - ["[", "]"], - ["(", ")"], - ["\"", "\""], - ["'", "'"], - ["`", "`"], - ["\"\"\"", "\"\"\""] + [ "{", "}" ], + [ "[", "]" ], + [ "(", ")" ], + [ "\"", "\"" ], + [ "'", "'" ], + [ "`", "`" ], + [ "\"\"\"", "\"\"\"" ] ], "folding": { "offSide": true, diff --git a/package-lock.json b/package-lock.json index 68fb7f06..6e0d6c9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8590,21 +8590,21 @@ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, - "requires": {} + "requires": { } }, "@webpack-cli/info": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, - "requires": {} + "requires": { } }, "@webpack-cli/serve": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, - "requires": {} + "requires": { } }, "@xtuc/ieee754": { "version": "1.2.0", @@ -8638,14 +8638,14 @@ "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "dev": true, - "requires": {} + "requires": { } }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, - "requires": {} + "requires": { } }, "acorn-walk": { "version": "8.2.0", @@ -8706,7 +8706,7 @@ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, - "requires": {} + "requires": { } }, "ansi-regex": { "version": "5.0.1", @@ -12619,7 +12619,7 @@ "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, - "requires": {} + "requires": { } }, "ts-loader": { "version": "9.5.1", diff --git a/package.json b/package.json index ce99cb27..f2effc40 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "runtime": "node", "configurationAttributes": { "launch": { - "required": [], + "required": [ ], "properties": { "command": { "type": "string", @@ -154,7 +154,7 @@ "args": { "type": "array", "description": "Args to run Ren'Py with.", - "default": [] + "default": [ ] } } } @@ -165,7 +165,7 @@ "request": "launch", "name": "Ren'Py: Launch", "command": "run", - "args": [] + "args": [ ] } ], "configurationSnippets": [ @@ -177,7 +177,7 @@ "request": "launch", "name": "Ren'Py", "command": "run", - "args": [] + "args": [ ] } } ] @@ -198,7 +198,7 @@ "args": { "type": "array", "description": "Args to run Ren'Py with.", - "default": [] + "default": [ ] } } } diff --git a/snippets/snippets.json b/snippets/snippets.json index 14d14563..36db952d 100644 --- a/snippets/snippets.json +++ b/snippets/snippets.json @@ -1,6 +1,6 @@ { "Region": { - "prefix": ["#region", "region"], + "prefix": [ "#region", "region" ], "body": "#region ${1:Region name}\n$0\n#endregion ${1:Region name}", "description": "Create a new folding region." }, diff --git a/syntaxes/log.injection.json b/syntaxes/log.injection.json index 1044f518..625c7d81 100644 --- a/syntaxes/log.injection.json +++ b/syntaxes/log.injection.json @@ -3,7 +3,7 @@ "injectionSelector": "L:text.log", "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", - "patterns": [{ "include": "#debug-msg" }, { "include": "#info-msg" }, { "include": "#warning-msg" }, { "include": "#error-msg" }], + "patterns": [ { "include": "#debug-msg" }, { "include": "#info-msg" }, { "include": "#warning-msg" }, { "include": "#error-msg" } ], "repository": { "debug-msg": { @@ -14,7 +14,7 @@ "2": { "name": "punctuation.definition.log.end" } }, "end": "(?=^\\d{4})", - "patterns": [{ "include": "#msg-content" }] + "patterns": [ { "include": "#msg-content" } ] }, "info-msg": { "name": "log.info.renpy", @@ -25,7 +25,7 @@ "3": { "name": "punctuation.definition.log.end" } }, "end": "(?=^\\d{4})", - "patterns": [{ "include": "#msg-content" }] + "patterns": [ { "include": "#msg-content" } ] }, "warning-msg": { "name": "entity.name.function.warning, strong log.warning.renpy", @@ -35,7 +35,7 @@ "2": { "name": "punctuation.definition.tag.end" } }, "end": "(?=^\\d{4})", - "patterns": [{ "include": "#msg-content" }] + "patterns": [ { "include": "#msg-content" } ] }, "error-msg": { "name": "invalid.error, strong log.error.renpy", @@ -45,7 +45,7 @@ "2": { "name": "punctuation.definition.tag.end" } }, "end": "(?=^\\d{4})", - "patterns": [{ "include": "#msg-content" }] + "patterns": [ { "include": "#msg-content" } ] }, "msg-content": { "patterns": [ diff --git a/syntaxes/old.renpy.tmLanguage.json b/syntaxes/old.renpy.tmLanguage.json index c446989b..ce2ce615 100644 --- a/syntaxes/old.renpy.tmLanguage.json +++ b/syntaxes/old.renpy.tmLanguage.json @@ -1,7 +1,7 @@ { "scopeName": "source.renpy", "name": "Ren'Py", - "fileTypes": ["rpy", "rpym"], + "fileTypes": [ "rpy", "rpym" ], "firstLineMatch": "^#!/.*\\brenpy\\b", "patterns": [ { @@ -151,7 +151,7 @@ "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "contentName": "entity.name.function.python.renpy", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#entity_name_function" }] + "patterns": [ { "include": "#entity_name_function" } ] }, { "begin": "(\\()", @@ -223,7 +223,7 @@ "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "contentName": "entity.name.function.python.renpy.screen.renpy", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#entity_name_function" }] + "patterns": [ { "include": "#entity_name_function" } ] }, { "begin": "(\\()", @@ -298,7 +298,7 @@ } }, "name": "meta.class.old-style.python.renpy", - "patterns": [{ "include": "#entity_name_class" }] + "patterns": [ { "include": "#entity_name_class" } ] }, { "begin": "^\\s*(class)\\s+(?=[a-zA-Z_][a-zA-Z_0-9]*\\s*\\()", @@ -323,7 +323,7 @@ "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "contentName": "entity.name.type.class.python.renpy", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#entity_name_class" }] + "patterns": [ { "include": "#entity_name_class" } ] }, { "begin": "(\\()", @@ -344,7 +344,7 @@ "name": "punctuation.separator.inheritance.python.renpy" } }, - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] } ] } @@ -370,7 +370,7 @@ "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "contentName": "entity.name.type.class.python.renpy", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#entity_name_function" }] + "patterns": [ { "include": "#entity_name_function" } ] } ] }, @@ -397,7 +397,7 @@ "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "contentName": "entity.name.function.python.renpy", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#entity_name_function" }] + "patterns": [ { "include": "#entity_name_function" } ] }, { "begin": "(\\()", @@ -445,7 +445,7 @@ "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "contentName": "entity.name.function.python.renpy", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#entity_name_function" }] + "patterns": [ { "include": "#entity_name_function" } ] } ] }, @@ -552,7 +552,7 @@ }, "contentName": "entity.name.function.decorator.python.renpy", "end": "(?=\\s*\\()", - "patterns": [{ "include": "#dotted_name" }] + "patterns": [ { "include": "#dotted_name" } ] }, { "begin": "(\\()", @@ -563,7 +563,7 @@ }, "contentName": "meta.function.decorator.arguments.python.renpy", "end": "(?=\\))", - "patterns": [{ "include": "#keyword_arguments" }, { "include": "$self" }] + "patterns": [ { "include": "#keyword_arguments" }, { "include": "$self" } ] } ] }, @@ -581,7 +581,7 @@ } }, "end": "(?=\\s|$\\n?|#)", - "patterns": [{ "include": "#dotted_name" }] + "patterns": [ { "include": "#dotted_name" } ] } ] }, @@ -600,7 +600,7 @@ } }, "name": "meta.function-call.python.renpy", - "patterns": [{ "include": "#keyword_arguments" }, { "include": "$self" }] + "patterns": [ { "include": "#keyword_arguments" }, { "include": "$self" } ] }, { "begin": "(?=[A-Za-z_][A-Za-z0-9_]*(?:\\.[a-zA-Z_][a-zA-Z_0-9]*)*\\s*\\()", @@ -615,7 +615,7 @@ { "begin": "(?=[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*\\s*\\()", "end": "(?=\\s*\\()", - "patterns": [{ "include": "#dotted_name" }] + "patterns": [ { "include": "#dotted_name" } ] }, { "begin": "(\\()", @@ -626,7 +626,7 @@ }, "contentName": "meta.function-call.arguments.python.renpy", "end": "(?=\\))", - "patterns": [{ "include": "#keyword_arguments" }, { "include": "$self" }] + "patterns": [ { "include": "#keyword_arguments" }, { "include": "$self" } ] } ] }, @@ -643,7 +643,7 @@ { "begin": "(?=[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*\\s*\\[)", "end": "(?=\\s*\\[)", - "patterns": [{ "include": "#dotted_name" }] + "patterns": [ { "include": "#dotted_name" } ] }, { "begin": "(\\[)", @@ -654,7 +654,7 @@ }, "contentName": "meta.item-access.arguments.python.renpy", "end": "(?=\\])", - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] } ] }, @@ -673,7 +673,7 @@ } }, "name": "meta.item-access.python.renpy", - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] }, { "include": "#line_continuation" }, { "include": "#language_variables" }, @@ -687,7 +687,7 @@ { "begin": "(\\()", "end": "(\\))", - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] }, { "captures": { @@ -725,7 +725,7 @@ "name": "punctuation.separator.list.python.renpy" } }, - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] } ] }, @@ -779,7 +779,7 @@ "name": "punctuation.separator.valuepair.dictionary.python.renpy" } }, - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] }, { "begin": "(?<=\\:|^)\\s*", @@ -790,7 +790,7 @@ "name": "punctuation.separator.dictionary.python.renpy" } }, - "patterns": [{ "include": "$self" }] + "patterns": [ { "include": "$self" } ] } ] } @@ -822,13 +822,13 @@ "begin": "^\\s*(?=[uU]?[rR]?\"\"\")", "end": "(?<=\"\"\")", "name": "comment.block.python.renpy", - "patterns": [{ "include": "#string_quoted_double" }] + "patterns": [ { "include": "#string_quoted_double" } ] }, { "begin": "^\\s*(?=[uU]?[rR]?''')", "end": "(?<=''')", "name": "comment.block.python.renpy", - "patterns": [{ "include": "#string_quoted_single" }] + "patterns": [ { "include": "#string_quoted_single" } ] } ] }, @@ -839,7 +839,7 @@ { "begin": "(\\.)(?=[A-Za-z_][A-Za-z0-9_]*)", "end": "(?![A-Za-z0-9_])", - "patterns": [{ "include": "#magic_function_names" }, { "include": "#magic_variable_names" }, { "include": "#illegal_names" }, { "include": "#generic_names" }] + "patterns": [ { "include": "#magic_function_names" }, { "include": "#magic_variable_names" }, { "include": "#illegal_names" }, { "include": "#generic_names" } ] }, { "begin": "(?>>|\\.\\.\\.)\\s)(?=\\s*\\S))", @@ -244,7 +244,7 @@ }, "expression-base": { "comment": "valid Python expressions with comments and line continuation", - "patterns": [{ "include": "#comments" }, { "include": "#expression-bare" }, { "include": "#line-continuation" }] + "patterns": [ { "include": "#comments" }, { "include": "#expression-bare" }, { "include": "#line-continuation" } ] }, "expression": { "comment": "All valid Python expressions", @@ -266,10 +266,10 @@ "1": { "name": "punctuation.separator.dot.python" } }, "end": "(?<=\\S)(?=\\W)|(^|(?<=\\s))(?=[^\\\\\\w\\s])|$", - "patterns": [{ "include": "#function-call" }, { "include": "#member-access-base" }, { "include": "#member-access-attribute" }] + "patterns": [ { "include": "#function-call" }, { "include": "#member-access-base" }, { "include": "#member-access-attribute" } ] }, "member-access-base": { - "patterns": [{ "include": "#magic-names" }, { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#special-names" }, { "include": "#line-continuation" }, { "include": "#item-access" }] + "patterns": [ { "include": "#magic-names" }, { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#special-names" }, { "include": "#line-continuation" }, { "include": "#item-access" } ] }, "member-access-attribute": { "comment": "Highlight attribute access in otherwise non-specialized cases.", @@ -306,7 +306,7 @@ "endCaptures": { "0": { "name": "punctuation.definition.list.end.python" } }, - "patterns": [{ "include": "#expression" }] + "patterns": [ { "include": "#expression" } ] }, "odd-function-call": { "comment": "A bit obscured function call where there may have been an arbitrary number of other operations to get the function.E.g. \"arr[idx](args)\"", @@ -316,7 +316,7 @@ "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, - "patterns": [{ "include": "#function-arguments" }] + "patterns": [ { "include": "#function-arguments" } ] }, "round-braces": { "begin": "\\(", @@ -327,7 +327,7 @@ "endCaptures": { "0": { "name": "punctuation.parenthesis.end.python" } }, - "patterns": [{ "include": "#expression" }] + "patterns": [ { "include": "#expression" } ] }, "line-continuation": { "patterns": [ @@ -344,7 +344,7 @@ "beginCaptures": { "1": { "name": "punctuation.separator.continuation.line.python" } }, - "patterns": [{ "include": "#regexp" }, { "include": "#string" }] + "patterns": [ { "include": "#regexp" }, { "include": "#string" } ] } ] }, @@ -443,7 +443,7 @@ } }, "regexp": { - "patterns": [{ "include": "#regexp-single-three-line" }, { "include": "#regexp-double-three-line" }, { "include": "#regexp-single-one-line" }, { "include": "#regexp-double-one-line" }] + "patterns": [ { "include": "#regexp-single-three-line" }, { "include": "#regexp-double-three-line" }, { "include": "#regexp-single-one-line" }, { "include": "#regexp-double-one-line" } ] }, "string": { "patterns": [ @@ -464,23 +464,23 @@ ] }, "string-unicode-guts": { - "patterns": [{ "include": "source.renpy#strings-interior" }, { "include": "#escape-sequence-unicode" }, { "include": "#string-entity" }, { "include": "#string-brace-formatting" }] + "patterns": [ { "include": "source.renpy#strings-interior" }, { "include": "#escape-sequence-unicode" }, { "include": "#string-entity" }, { "include": "#string-brace-formatting" } ] }, "string-consume-escape": { "match": "\\\\['\"\\n\\\\]" }, "string-raw-guts": { - "patterns": [{ "include": "#string-consume-escape" }, { "include": "#string-formatting" }, { "include": "#string-brace-formatting" }] + "patterns": [ { "include": "#string-consume-escape" }, { "include": "#string-formatting" }, { "include": "#string-brace-formatting" } ] }, "string-raw-bin-guts": { - "patterns": [{ "include": "#string-consume-escape" }, { "include": "#string-formatting" }] + "patterns": [ { "include": "#string-consume-escape" }, { "include": "#string-formatting" } ] }, "string-entity": { - "patterns": [{ "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#string-formatting" }] + "patterns": [ { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#string-formatting" } ] }, "fstring-guts": { - "patterns": [{ "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#fstring-formatting" }] + "patterns": [ { "include": "#escape-sequence-unicode" }, { "include": "#escape-sequence" }, { "include": "#string-line-continuation" }, { "include": "#fstring-formatting" } ] }, "fstring-raw-guts": { - "patterns": [{ "include": "#string-consume-escape" }, { "include": "#fstring-formatting" }] + "patterns": [ { "include": "#string-consume-escape" }, { "include": "#fstring-formatting" } ] }, "fstring-illegal-single-brace": { "comment": "it is illegal to have a multiline brace inside a single-line string", @@ -492,10 +492,10 @@ "endCaptures": { "1": { "name": "constant.character.format.placeholder.other.python" } }, - "patterns": [{ "include": "#fstring-terminator-single" }, { "include": "#f-expression" }] + "patterns": [ { "include": "#fstring-terminator-single" }, { "include": "#f-expression" } ] }, "fstring-illegal-multi-brace": { - "patterns": [{ "include": "#impossible" }] + "patterns": [ { "include": "#impossible" } ] }, "f-expression": { "comment": "All valid Python expressions, except comments and line continuation", @@ -554,7 +554,7 @@ ] }, "fstring-formatting": { - "patterns": [{ "include": "#fstring-formatting-braces" }, { "include": "#fstring-formatting-singe-brace" }] + "patterns": [ { "include": "#fstring-formatting-braces" }, { "include": "#fstring-formatting-singe-brace" } ] }, "fstring-formatting-singe-brace": { "name": "invalid.illegal.brace.python", @@ -605,7 +605,7 @@ "endCaptures": { "1": { "name": "punctuation.section.class.begin.python" } }, - "patterns": [{ "include": "#class-name" }, { "include": "#class-inheritance" }] + "patterns": [ { "include": "#class-name" }, { "include": "#class-inheritance" } ] } ] }, @@ -674,7 +674,7 @@ "beginCaptures": { "1": { "name": "punctuation.separator.dot.python" } }, - "patterns": [{ "include": "#call-wrapper-inheritance" }, { "include": "#member-access-base" }, { "include": "#inheritance-identifier" }] + "patterns": [ { "include": "#call-wrapper-inheritance" }, { "include": "#member-access-base" }, { "include": "#inheritance-identifier" } ] }, "lambda": { "patterns": [ @@ -747,7 +747,7 @@ "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, - "patterns": [{ "include": "#expression" }] + "patterns": [ { "include": "#expression" } ] }, "generator": { "comment": "Match \"for ... in\" construct used in generators and for loops to correctly identify the \"in\" as a control flow keyword.", @@ -759,7 +759,7 @@ "endCaptures": { "0": { "name": "keyword.control.flow.python" } }, - "patterns": [{ "include": "#expression" }] + "patterns": [ { "include": "#expression" } ] }, "function-declaration": { "name": "meta.function.python", @@ -772,7 +772,7 @@ "endCaptures": { "1": { "name": "punctuation.section.function.begin.python" } }, - "patterns": [{ "include": "#function-def-name" }, { "include": "#parameters" }, { "include": "#line-continuation" }, { "include": "#return-annotation" }] + "patterns": [ { "include": "#function-def-name" }, { "include": "#parameters" }, { "include": "#line-continuation" }, { "include": "#return-annotation" } ] }, "function-def-name": { "patterns": [ @@ -837,7 +837,7 @@ "endCaptures": { "1": { "name": "punctuation.separator.parameters.python" } }, - "patterns": [{ "include": "#expression" }] + "patterns": [ { "include": "#expression" } ] }, "annotated-parameter": { "begin": "\\b([[:alpha:]_]\\w*)\\s*(:)", @@ -863,7 +863,7 @@ "beginCaptures": { "1": { "name": "punctuation.separator.annotation.result.python" } }, - "patterns": [{ "include": "#expression" }] + "patterns": [ { "include": "#expression" } ] }, "item-access": { "patterns": [ @@ -874,7 +874,7 @@ "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, - "patterns": [{ "include": "#item-name" }, { "include": "#item-index" }, { "include": "#expression" }] + "patterns": [ { "include": "#item-name" }, { "include": "#item-index" }, { "include": "#expression" } ] } ] }, @@ -916,7 +916,7 @@ "1": { "name": "punctuation.definition.arguments.end.python" }, "2": { "name": "invalid.illegal.decorator.python" } }, - "patterns": [{ "include": "#decorator-name" }, { "include": "#function-arguments" }] + "patterns": [ { "include": "#decorator-name" }, { "include": "#function-arguments" } ] }, "decorator-name": { "patterns": [ @@ -947,10 +947,10 @@ "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, - "patterns": [{ "include": "#inheritance-name" }, { "include": "#function-arguments" }] + "patterns": [ { "include": "#inheritance-name" }, { "include": "#function-arguments" } ] }, "inheritance-name": { - "patterns": [{ "include": "#lambda-incomplete" }, { "include": "#builtin-possible-callables" }, { "include": "#inheritance-identifier" }] + "patterns": [ { "include": "#lambda-incomplete" }, { "include": "#builtin-possible-callables" }, { "include": "#inheritance-identifier" } ] }, "function-call": { "name": "meta.function-call.python", @@ -960,7 +960,7 @@ "endCaptures": { "1": { "name": "punctuation.definition.arguments.end.python" } }, - "patterns": [{ "include": "#special-variables" }, { "include": "#function-name" }, { "include": "#function-arguments" }] + "patterns": [ { "include": "#special-variables" }, { "include": "#function-name" }, { "include": "#function-arguments" } ] }, "function-name": { "patterns": [ @@ -1014,10 +1014,10 @@ ] }, "builtin-callables": { - "patterns": [{ "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#builtin-exceptions" }, { "include": "#builtin-functions" }, { "include": "#builtin-types" }] + "patterns": [ { "include": "#illegal-names" }, { "include": "#illegal-object-name" }, { "include": "#builtin-exceptions" }, { "include": "#builtin-functions" }, { "include": "#builtin-types" } ] }, "builtin-possible-callables": { - "patterns": [{ "include": "#builtin-callables" }, { "include": "#magic-names" }] + "patterns": [ { "include": "#builtin-callables" }, { "include": "#magic-names" } ] }, "builtin-exceptions": { "name": "support.type.exception.python", @@ -1054,7 +1054,7 @@ } }, "magic-names": { - "patterns": [{ "include": "#magic-function-names" }, { "include": "#magic-variable-names" }] + "patterns": [ { "include": "#magic-function-names" }, { "include": "#magic-variable-names" } ] }, "illegal-names": { "match": "\\b(?:(and|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|in|is|(?<=\\.)lambda|lambda(?=\\s*[\\.=])|nonlocal|not|or|pass|raise|return|try|while|with|yield)|(as|import))\\b", @@ -1078,7 +1078,7 @@ "name": "invalid.deprecated.backtick.python", "begin": "\\`", "end": "(?:\\`|(?" }, "regexp-base-expression": { - "patterns": [{ "include": "#regexp-quantifier" }, { "include": "#regexp-base-common" }] + "patterns": [ { "include": "#regexp-quantifier" }, { "include": "#regexp-base-common" } ] }, "fregexp-base-expression": { "patterns": [ @@ -1206,7 +1206,7 @@ "match": "\\\\(.|\\n)" }, "regexp-escape-sequence": { - "patterns": [{ "include": "#regexp-escape-special" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-backreference-number" }, { "include": "#regexp-escape-catchall" }] + "patterns": [ { "include": "#regexp-escape-special" }, { "include": "#regexp-escape-character" }, { "include": "#regexp-escape-unicode" }, { "include": "#regexp-backreference-number" }, { "include": "#regexp-escape-catchall" } ] }, "regexp-charecter-set-escapes": { "patterns": [ @@ -1237,7 +1237,7 @@ "1": { "name": "punctuation.definition.comment.python" } }, "end": "($)", - "patterns": [{ "include": "#codetags" }] + "patterns": [ { "include": "#codetags" } ] }, "comments-string-single-three": { "name": "comment.line.number-sign.python", @@ -1246,7 +1246,7 @@ "1": { "name": "punctuation.definition.comment.python" } }, "end": "($|(?='''))", - "patterns": [{ "include": "#codetags" }] + "patterns": [ { "include": "#codetags" } ] }, "comments-string-double-three": { "name": "comment.line.number-sign.python", @@ -1255,7 +1255,7 @@ "1": { "name": "punctuation.definition.comment.python" } }, "end": "($|(?=\"\"\"))", - "patterns": [{ "include": "#codetags" }] + "patterns": [ { "include": "#codetags" } ] }, "single-one-regexp-expression": { "patterns": [ @@ -1314,7 +1314,7 @@ "1": { "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.named.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [{ "include": "#single-one-regexp-expression" }] + "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-comments": { "name": "comment.regexp", @@ -1327,7 +1327,7 @@ "1": { "name": "punctuation.comment.end.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [{ "include": "#codetags" }] + "patterns": [ { "include": "#codetags" } ] }, "single-one-regexp-lookahead": { "begin": "(\\()\\?=", @@ -1340,7 +1340,7 @@ "1": { "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.end.lookahead.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [{ "include": "#single-one-regexp-expression" }] + "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-lookahead-negative": { "begin": "(\\()\\?!", @@ -1353,7 +1353,7 @@ "1": { "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.end.lookahead.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [{ "include": "#single-one-regexp-expression" }] + "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-lookbehind": { "begin": "(\\()\\?<=", @@ -1366,7 +1366,7 @@ "1": { "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.end.lookbehind.regexp" }, "2": { "name": "invalid.illegal.newline.python" } }, - "patterns": [{ "include": "#single-one-regexp-expression" }] + "patterns": [ { "include": "#single-one-regexp-expression" } ] }, "single-one-regexp-lookbehind-negative": { "begin": "(\\()\\?