diff --git a/README.md b/README.md index 9887208..83e97c0 100644 --- a/README.md +++ b/README.md @@ -2,58 +2,63 @@ A complete set of tools to code games with the [Godot game engine](http://www.go ## Features -The plug-in comes with a wealth of features to make your programming experience as comfortable as possible +The extension comes with a wealth of features to make your Godot programming experience as comfortable as possible: -- Syntax highlighting for the GDscript language -- Syntax highlighting for the tscn and tres scene formats -- Function definitions and documentation on hover -- Rich auto completion +- Syntax highlighting for the GDscript (`.gd`) language +- Syntax highlighting for the `.tscn` and `.tres` scene formats +- Function definitions and documentation display on hover (see image below) +- Rich auto-completion - Static code validation -- Open projects and scenes in Godot from VScode -- Ctrl click on a variable or method call to jump to its definition -- Full documentation supported with API of godot engine +- Open projects and scenes in Godot from VS Code +- Ctrl-click on a variable or method call to jump to its definition +- Full documentation of the Godot engine's API supported ![Showing the documentation on hover feature](img/godot-tools.jpg) -## Available commands +## Available Commands -The plug-ins adds a few entries to the command palette +The extension adds a few entries to the VS Code Command Palette under "GodotTools": -- Update Workspace Symbols -- Run workspace as godot project -- Open workspace with godot editor +- Update workspace symbols +- Run workspace as Godot project +- Open workspace with Godot editor - Run current scene ## Settings -If you like this plugin you can set VSCode as your default script editor with following steps: +### Godot + +If you like this extension, you can set VS Code as your default script editor for Godot by following these steps: 1. Open editor settings 2. Select `Text Editor / External` -3. Check the `Use External Editor` box with mouse click -4. Fill `Exec Path` to the path of your Visual Studio Code +3. Make sure the `Use External Editor` box is checked +4. Fill `Exec Path` with the path to your VS Code executable 5. Fill `Exec Flags` with `{project} --goto {file}:{line}:{col}` -You can use the following settings to setup the Godot Tools: -- GodotTools.godotVersion: The godot version of your project -- GodotTools.editorPath: An absolute path pointing at the Godot Editor executable file. Required to run the project and test scenes from VScode -- GodotTools.workspaceDocumentWithMarkdown: Control the documentations of workspace symbols should be rendered as plain text or html from markdown -- GodotTools.ignoreIndentedVars: Parse variables defined after indent of not -- GodotTools.parseTextScene: Parse scene files with extension ends with tscn -- GodotTools.completeNodePath: Show node paths of of workspace in the code completion -- GodotTools.godotProjectRoot: The godot project directory wich contains project.godot or engine.cfg -## Issues and contributions +### VS Code -The [Godot Tools](https://github.com/GodotExplorer/godot-tools) and the go to [engine modules](https://github.com/GodotExplorer/editor-server) are all hosted on GitHub. Feel free to open issues there and create pull requests anytime. +You can use the following settings to configure Godot Tools: +- **GodotTools.godotVersion** - The Godot version of your project. +- **GodotTools.editorPath** - The absolute path to the Godot executable. Required to run the project and test scenes directly from VS Code. +- **GodotTools.workspaceDocumentWithMarkdown** - Control how the documentation of workspace symbols should be rendered: as plain text or as HTML from Markdown. +- **GodotTools.ignoreIndentedVars** - Only parse variables defined on lines without an indentation. +- **GodotTools.parseTextScene** - Parse a file as a Godot scene when the file name ends with `.tscn`. +- **GodotTools.completeNodePath** - Show node paths within a workspace as part of code completion. +- **GodotTools.godotProjectRoot** - Your Godot project's directory, which contains `project.godot` or `engine.cfg`. + +## Issues and Contributions + +The [Godot Tools](https://github.com/GodotExplorer/godot-tools) extension and [engine modules](https://github.com/GodotExplorer/editor-server) are both hosted on GitHub. Feel free to open issues there and create pull requests anytime. + +See the [full changelog](https://github.com/GodotExplorer/godot-tools/blob/master/CHANGELOG.md) for the latest changes. ## FAQ -### Intelisense isn't showing up for me +### Why isn't Intellisense showing up for me? -Make sure you save your .gd file, then run "GodotTools: Update Workspace Symbols" from the command palate +Make sure you save your `.gd` file, then run "GodotTools: Update Workspace Symbols" from the Command Palette. -[Full change log](https://github.com/GodotExplorer/godot-tools/blob/master/CHANGELOG.md) - -## TODOS: -* Convert official BBCode documentation into Markdown and render it to HTML with documentation previewer pages +## TODO: +* Convert official BBCode documentation into Markdown and render it into HTML with documentation previewer pages * Add mermaid support with documentation * Undefined variable checking diff --git a/package.json b/package.json index 5f389c6..44de161 100644 --- a/package.json +++ b/package.json @@ -23,15 +23,15 @@ "commands": [ { "command": "godot.updateWorkspaceSymbols", - "title": "GodotTools: Update Workspace Symbols" + "title": "GodotTools: Update workspace symbols" }, { "command": "godot.runWorkspace", - "title": "GodotTools: Run workspace as godot project" + "title": "GodotTools: Run workspace as Godot project" }, { "command": "godot.openWithEditor", - "title": "GodotTools: Open workspace with godot editor" + "title": "GodotTools: Open workspace with Godot editor" }, { "command": "godot.runCurrentScene", @@ -40,7 +40,7 @@ ], "configuration": { "type": "object", - "title": "Godot tools configuration", + "title": "Godot Tools configuration", "properties": { "GodotTools.maxNumberOfProblems": { "type": "number", @@ -50,12 +50,12 @@ "GodotTools.editorPath": { "type": "string", "default": "", - "description": "The absolute path of your godot editor" + "description": "The absolute path to the Godot executable" }, "GodotTools.workspaceDocumentWithMarkdown": { "type": "boolean", "default": false, - "description": "Render workspace documentations as markdown content" + "description": "Render workspace documentations as Markdown content" }, "GodotTools.ignoreIndentedVars": { "type": "boolean", @@ -64,28 +64,28 @@ }, "GodotTools.godotVersion": { "type": "number", - "default": 3, - "description": "The godot version of your project" + "default": 3.0, + "description": "The Godot version of your project" }, "GodotTools.parseTextScene": { "type": "boolean", "default": true, - "description": "Parse scene files with extention ends with tscn" + "description": "Parse a file as a Godot scene when the file name ends with tscn" }, "GodotTools.completeNodePath": { "type": "boolean", "default": false, - "description": "Show node pathes of of workspace in the code completion" + "description": "Show node paths within a workspace as part of code completion" }, "GodotTools.godotProjectRoot": { "type": "string", "default": "${workspaceRoot}", - "description": "Relate path to the godot project" + "description": "Your Godot project's directory" }, "GodotTools.enableSyntaxChecking": { "type": "boolean", "default": true, - "description": "Turn on/off the syntax checking for GDScript" + "description": "Turn on/off syntax checking for GDScript" }, "GodotTools.lint": { "type": "object", diff --git a/src/tool_manager.ts b/src/tool_manager.ts index 9551bec..291aaf0 100644 --- a/src/tool_manager.ts +++ b/src/tool_manager.ts @@ -78,12 +78,12 @@ class ToolManager { if (path && path.length > 0 && path.endsWith("/")) path = path.substring(0, path.length - 1) if (path.toLowerCase() == self.workspaceDir.toLowerCase()) - vscode.window.showInformationMessage("Connected to godot editor server"); + vscode.window.showInformationMessage("Connected to the Godot editor server"); else { - vscode.window.showWarningMessage("The opened project is not same with godot editor"); + vscode.window.showWarningMessage("The opened project is not the same within the Godot editor"); } }).catch(e => { - vscode.window.showErrorMessage("Failed connect to godot editor server"); + vscode.window.showErrorMessage("Failed connecting to the Godot editor server"); }); } @@ -124,7 +124,7 @@ class ToolManager { gdpath = path.join(this._rootDir, gdpath); let showgdpath = vscode.workspace.asRelativePath(gdpath); - let doc = "Auto loaded instance of " + `[${showgdpath}](${vscode.Uri.file(gdpath).toString()})`; + let doc = "Autoloaded instance of " + `[${showgdpath}](${vscode.Uri.file(gdpath).toString()})`; doc = doc.replace(/"/g, " "); script.constants[name] = new vscode.Range(0, 0, 0, 0); @@ -186,7 +186,7 @@ class ToolManager { this.runEditor(`${pathFlag} "${this._rootDir}" ${params}`); } else - vscode.window.showErrorMessage("Current workspace is not a godot project"); + vscode.window.showErrorMessage("Current workspace is not a Godot project"); } private runEditor(params = "") { @@ -242,7 +242,7 @@ class ToolManager { if (!done) done = config.loadClasses(path.join(this._context.extensionPath, this._biuitinDocFile)); if (!done) - vscode.window.showErrorMessage("Load GDScript documentations failed"); + vscode.window.showErrorMessage("Loading GDScript documentation failed"); } dispose() {