Skip to content

Commit

Permalink
Merge pull request #421 from renpy/various-bug-fixes
Browse files Browse the repository at this point in the history
Prettier formatting on json files was annoying me
  • Loading branch information
duckdoom4 authored Jul 11, 2024
2 parents fc805cb + 44f0b5e commit 6a95202
Show file tree
Hide file tree
Showing 15 changed files with 345 additions and 359 deletions.
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -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" ]
}
14 changes: 7 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/examples" // open examples directory
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"outFiles": [ "${workspaceFolder}/dist/**/*.js" ],
"preLaunchTask": "npm: watch",
"skipFiles": ["<node_internals>/**", "**/extensions/git*/**", "**/node_modules/prettier/**", "**/node/extensionHostProcess.js"]
"skipFiles": [ "<node_internals>/**", "**/extensions/git*/**", "**/node_modules/prettier/**", "**/node/extensionHostProcess.js" ]
},
{
"name": "Launch Extension (Release)",
Expand All @@ -27,19 +27,19 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/examples" // open examples directory
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"outFiles": [ "${workspaceFolder}/dist/**/*.js" ],
"preLaunchTask": "npm: watch-release",
"skipFiles": ["<node_internals>/**", "**/extensions/git*/**", "**/node_modules/prettier/**"]
"skipFiles": [ "<node_internals>/**", "**/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": ["<node_internals>/**", "**/extensions/git*/**", "**/node_modules/prettier/**"]
"skipFiles": [ "<node_internals>/**", "**/extensions/git*/**", "**/node_modules/prettier/**" ]
}
]
}
10 changes: 7 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -35,7 +38,8 @@
"Ren'Py",
"rpyc",
"Uncompiled"
]
],

"editor.tokenColorCustomizations": {
"[*Light*]": {
"textMateRules": [
Expand Down
2 changes: 1 addition & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"type": "npm",
"script": "lint",
"group": "build",
"problemMatcher": ["$eslint-stylish"]
"problemMatcher": [ "$eslint-stylish" ]
}
]
}
2 changes: 1 addition & 1 deletion examples/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}
},
{
"scope": ["renpy.meta.u", "renpy.meta.a"],
"scope": [ "renpy.meta.u", "renpy.meta.a" ],
"settings": {
"fontStyle": "underline"
}
Expand Down
62 changes: 31 additions & 31 deletions language-configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,53 +2,53 @@
"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": [
{ "open": "{", "close": "}" },
{ "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,
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
"runtime": "node",
"configurationAttributes": {
"launch": {
"required": [],
"required": [ ],
"properties": {
"command": {
"type": "string",
Expand All @@ -154,7 +154,7 @@
"args": {
"type": "array",
"description": "Args to run Ren'Py with.",
"default": []
"default": [ ]
}
}
}
Expand All @@ -165,7 +165,7 @@
"request": "launch",
"name": "Ren'Py: Launch",
"command": "run",
"args": []
"args": [ ]
}
],
"configurationSnippets": [
Expand All @@ -177,7 +177,7 @@
"request": "launch",
"name": "Ren'Py",
"command": "run",
"args": []
"args": [ ]
}
}
]
Expand All @@ -198,7 +198,7 @@
"args": {
"type": "array",
"description": "Args to run Ren'Py with.",
"default": []
"default": [ ]
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion snippets/snippets.json
Original file line number Diff line number Diff line change
@@ -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."
},
Expand Down
10 changes: 5 additions & 5 deletions syntaxes/log.injection.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -45,7 +45,7 @@
"2": { "name": "punctuation.definition.tag.end" }
},
"end": "(?=^\\d{4})",
"patterns": [{ "include": "#msg-content" }]
"patterns": [ { "include": "#msg-content" } ]
},
"msg-content": {
"patterns": [
Expand Down
Loading

0 comments on commit 6a95202

Please sign in to comment.