Skip to content

Commit 7b7353e

Browse files
committed
Fix error reporting preventing compilation; update version
1 parent d4d83f3 commit 7b7353e

File tree

4 files changed

+205
-165
lines changed

4 files changed

+205
-165
lines changed

editor-plugins/vscode/CHANGELOG.md

Lines changed: 39 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
1-
# Change Log
2-
3-
## 1.1.2
4-
5-
New command to run an update command on the godot python toolkit.
6-
7-
## 1.1.1
8-
9-
New configuration to set the path to python, if the default is not to your liking.
10-
11-
## 1.1.0
12-
13-
Add the `Organize Script` and `Convert multiline comment blocks to #` commands.
14-
15-
Fix a bug that caused the last character, if it wasn't a newline, to repeat.
16-
17-
## 1.0.2
18-
19-
Fix to the README markdown and package.json
20-
21-
## 1.0.0
22-
23-
Initial release
1+
# Change Log
2+
3+
### 1.2.3
4+
5+
Allow the use of defaultInterpreterPath to control python path
6+
7+
### 1.2.2
8+
9+
Fix formatter issue
10+
11+
### 1.2.1
12+
13+
Fix scripts saving even when autosave was false
14+
15+
### 1.2
16+
17+
Fix save on format
18+
19+
### 1.1.2
20+
21+
Add the ability to update the pip package natively
22+
23+
### 1.1.1
24+
25+
Take the python path from VSCode configuration
26+
27+
### 1.1.0
28+
29+
Add the `Organize Script` and `Convert multiline comment blocks to #` commands.
30+
31+
Fix a bug that caused the last character, if it wasn't a newline, to repeat.
32+
33+
### 1.0.2
34+
35+
Fix to the README markdown and package.json
36+
37+
### 1.0.0
38+
39+
Initial release of the VSCode extension of GDScript Formatter.

editor-plugins/vscode/README.md

Lines changed: 74 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,74 @@
1-
# GDScript Formatter
2-
3-
A [vscode extension](https://marketplace.visualstudio.com/items?itemName=Razoric.gdscript-toolkit-formatter)
4-
that runs Scony's [python-based GDScript formatter.](https://github.com/Scony/godot-gdscript-toolkit)
5-
6-
## Features
7-
8-
- Formats GDScript code using the `Format Document` command, or when
9-
format-on-save is activated.
10-
- Command - `GDScript Format: Organize Script`: Re-orders GDScript
11-
elements of a script according to the official
12-
[style guide](http://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_styleguide.html#code-order).
13-
- Command - `GDScript Format: Convert multiline comments to # comments`:
14-
Converts old-style multiline blocks to # comment blocks. """ Multiline
15-
strings """ are not optimized away by Godot when the game is built,
16-
and so are being obsoleted from the documentation.
17-
18-
![Formatted output](assets/banner.png)
19-
20-
## Requirements
21-
22-
- `Python3` and `pip` should both be installed.
23-
- The `GDToolkit` module should be installed via pip, though if it is missing
24-
you will be prompted to install it.
25-
26-
## Extension Settings
27-
28-
- `gdscript_formatter.line_size`: The maximum size a given line can be before
29-
it is wrapped.
30-
31-
## Known Issues
32-
33-
### MacOS
34-
- if you get `ImportError: No module named gdtoolkit.formatter` or similar import error, make sure that VS Code uses `Python3` by setting `Python: Python Path` to `python3`. Alternatively in `settings.json`: `"python.pythonPath": "python3"`.
35-
36-
## Release Notes
37-
38-
### 1.1.0
39-
40-
Add the `Organize Script` and `Convert multiline comment blocks to #` commands.
41-
42-
Fix a bug that caused the last character, if it wasn't a newline, to repeat.
43-
44-
### 1.0.2
45-
46-
Fix to the README markdown and package.json
47-
48-
### 1.0.0
49-
50-
Initial release of the VSCode extension of GDScript Formatter.
1+
# GDScript Formatter
2+
3+
A [vscode extension](https://marketplace.visualstudio.com/items?itemName=Razoric.gdscript-toolkit-formatter)
4+
that runs Scony's [python-based GDScript formatter.](https://github.com/Scony/godot-gdscript-toolkit)
5+
6+
## Features
7+
8+
- Formats GDScript code using the `Format Document` command, or when
9+
format-on-save is activated.
10+
- Command - `GDScript Format: Organize Script`: Re-orders GDScript
11+
elements of a script according to the official
12+
[style guide](http://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_styleguide.html#code-order).
13+
- Command - `GDScript Format: Convert multiline comments to # comments`:
14+
Converts old-style multiline blocks to # comment blocks. """ Multiline
15+
strings """ are not optimized away by Godot when the game is built,
16+
and so are being obsoleted from the documentation.
17+
18+
![Formatted output](assets/banner.png)
19+
20+
## Requirements
21+
22+
- `Python3` and `pip` should both be installed.
23+
- The `GDToolkit` module should be installed via pip, though if it is missing
24+
you will be prompted to install it.
25+
26+
## Extension Settings
27+
28+
- `gdscript_formatter.line_size`: The maximum size a given line can be before
29+
it is wrapped.
30+
31+
## Known Issues
32+
33+
### MacOS
34+
- if you get `ImportError: No module named gdtoolkit.formatter` or similar import error, make sure that VS Code uses `Python3` by setting `Python: Python Path` to `python3`. Alternatively in `settings.json`: `"python.pythonPath": "python3"`.
35+
36+
## Release Notes
37+
38+
### 1.2.3
39+
40+
Allow the use of defaultInterpreterPath to control python path
41+
42+
### 1.2.2
43+
44+
Fix formatter issue
45+
46+
### 1.2.1
47+
48+
Fix scripts saving even when autosave was false
49+
50+
### 1.2
51+
52+
Fix save on format
53+
54+
### 1.1.2
55+
56+
Add the ability to update the pip package natively
57+
58+
### 1.1.1
59+
60+
Take the python path from VSCode configuration
61+
62+
### 1.1.0
63+
64+
Add the `Organize Script` and `Convert multiline comment blocks to #` commands.
65+
66+
Fix a bug that caused the last character, if it wasn't a newline, to repeat.
67+
68+
### 1.0.2
69+
70+
Fix to the README markdown and package.json
71+
72+
### 1.0.0
73+
74+
Initial release of the VSCode extension of GDScript Formatter.

editor-plugins/vscode/package.json

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,91 @@
1-
{
2-
"name": "gdscript-toolkit-formatter",
3-
"displayName": "GDScript Formatter",
4-
"description": "Formatter for GDScript in Visual Studio Code using Scony's GDScript Toolkit",
5-
"version": "1.1.2",
6-
"repository": {
7-
"type": "git",
8-
"url": "https://github.com/Scony/godot-gdscript-toolkit.git",
9-
"directory": "editor-plugins/vscode"
10-
},
11-
"publisher": "Razoric",
12-
"author": "Scony",
13-
"icon": "icon.png",
14-
"engines": {
15-
"vscode": "^1.33.0"
16-
},
17-
"categories": [
18-
"Formatters"
19-
],
20-
"activationEvents": [
21-
"onLanguage:gdscript"
22-
],
23-
"main": "./out/extension.js",
24-
"contributes": {
25-
"commands": [
26-
{
27-
"command": "gdscript-formatter.organize_script",
28-
"title": "GDScript Format: Organize script",
29-
"enablement": "editorLangId == gdscript"
30-
},
31-
{
32-
"command": "gdscript-formatter.convert_multiline",
33-
"title": "GDScript Format: Convert multiline comments to # comments",
34-
"enablement": "editorLangId == gdscript"
35-
},
36-
{
37-
"command": "gdscript-formatter.update_formatter",
38-
"title": "GDScript Format: Update formatter"
39-
}
40-
],
41-
"languages": [
42-
{
43-
"id": "gdscript",
44-
"extensions": [
45-
".gd"
46-
],
47-
"aliases": [
48-
"GDScript",
49-
"gdscript"
50-
],
51-
"configuration": "./configurations/gdscript-configuration.json"
52-
}
53-
],
54-
"configuration": {
55-
"type": "object",
56-
"title": "GDScript Formatter configuration",
57-
"properties": {
58-
"gdscript_formatter.line_size": {
59-
"type": "number",
60-
"default": 100,
61-
"description": "The maximum size a given line can be before being wrapped."
62-
}
63-
}
64-
}
65-
},
66-
"scripts": {
67-
"vscode:prepublish": "npm run compile",
68-
"compile": "tsc -p ./",
69-
"lint": "eslint src --ext ts",
70-
"watch": "tsc -watch -p ./",
71-
"pretest": "npm run compile && npm run lint",
72-
"test": "node ./out/test/runTest.js"
73-
},
74-
"devDependencies": {
75-
"@types/glob": "^7.1.1",
76-
"@types/mocha": "^7.0.1",
77-
"@types/node": "^12.11.7",
78-
"@types/vscode": "^1.33.0",
79-
"@typescript-eslint/eslint-plugin": "^2.18.0",
80-
"@typescript-eslint/parser": "^2.18.0",
81-
"eslint": "^6.8.0",
82-
"glob": "^7.1.6",
83-
"mocha": "^7.2.0",
84-
"typescript": "^3.7.5",
85-
"vscode-test": "^1.3.0"
86-
},
87-
"dependencies": {
88-
"opn": "^6.0.0",
89-
"python-shell": "^1.0.8"
90-
}
91-
}
1+
{
2+
"name": "gdscript-toolkit-formatter",
3+
"displayName": "GDScript Formatter",
4+
"description": "Formatter for GDScript in Visual Studio Code using Scony's GDScript Toolkit",
5+
"version": "1.2.3",
6+
"repository": {
7+
"type": "git",
8+
"url": "https://github.com/Scony/godot-gdscript-toolkit.git",
9+
"directory": "editor-plugins/vscode"
10+
},
11+
"publisher": "Razoric",
12+
"author": "Scony",
13+
"icon": "icon.png",
14+
"engines": {
15+
"vscode": "^1.33.0"
16+
},
17+
"categories": [
18+
"Formatters"
19+
],
20+
"activationEvents": [
21+
"onLanguage:gdscript"
22+
],
23+
"main": "./out/extension.js",
24+
"contributes": {
25+
"commands": [
26+
{
27+
"command": "gdscript-formatter.organize_script",
28+
"title": "GDScript Format: Organize script",
29+
"enablement": "editorLangId == gdscript"
30+
},
31+
{
32+
"command": "gdscript-formatter.convert_multiline",
33+
"title": "GDScript Format: Convert multiline comments to # comments",
34+
"enablement": "editorLangId == gdscript"
35+
},
36+
{
37+
"command": "gdscript-formatter.update_formatter",
38+
"title": "GDScript Format: Update formatter"
39+
}
40+
],
41+
"languages": [
42+
{
43+
"id": "gdscript",
44+
"extensions": [
45+
".gd"
46+
],
47+
"aliases": [
48+
"GDScript",
49+
"gdscript"
50+
],
51+
"configuration": "./configurations/gdscript-configuration.json"
52+
}
53+
],
54+
"configuration": {
55+
"type": "object",
56+
"title": "GDScript Formatter configuration",
57+
"properties": {
58+
"gdscript_formatter.line_size": {
59+
"type": "number",
60+
"default": 100,
61+
"description": "The maximum size a given line can be before being wrapped."
62+
}
63+
}
64+
}
65+
},
66+
"scripts": {
67+
"vscode:prepublish": "npm run compile",
68+
"compile": "tsc -p ./",
69+
"lint": "eslint src --ext ts",
70+
"watch": "tsc -watch -p ./",
71+
"pretest": "npm run compile && npm run lint",
72+
"test": "node ./out/test/runTest.js"
73+
},
74+
"devDependencies": {
75+
"@types/glob": "^7.1.1",
76+
"@types/mocha": "^7.0.1",
77+
"@types/node": "^12.11.7",
78+
"@types/vscode": "^1.33.0",
79+
"@typescript-eslint/eslint-plugin": "^2.18.0",
80+
"@typescript-eslint/parser": "^2.18.0",
81+
"eslint": "^6.8.0",
82+
"glob": "^7.1.6",
83+
"mocha": "^10.1.0",
84+
"typescript": "^3.9.10",
85+
"vscode-test": "^1.3.0"
86+
},
87+
"dependencies": {
88+
"opn": "^6.0.0",
89+
"python-shell": "^1.0.8"
90+
}
91+
}

editor-plugins/vscode/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export async function run_formatter(
9898
try {
9999
return await runPythonCommand(options);
100100
} catch (error) {
101-
onPythonError(error, uri);
101+
onPythonError(error as Error, uri);
102102
}
103103
}
104104

0 commit comments

Comments
 (0)