mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2026-01-01 17:48:36 +03:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a467ed990 | ||
|
|
60937ad776 | ||
|
|
0ac1299f47 | ||
|
|
cf22aa3595 | ||
|
|
c41bd642f0 | ||
|
|
8d8f5c2d9b | ||
|
|
119a7ebd23 | ||
|
|
555cb1ce9a |
@@ -1,5 +1,8 @@
|
||||
# Change Log
|
||||
|
||||
### 1.0.1
|
||||
* Fix run editor error on windows with default terminal configurations
|
||||
|
||||
### 1.0.0
|
||||
* Refactor the whole plugin with gdscript language server support
|
||||
* Add webview renderer to show documentations of native symbols.
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
{ "include": "#any-method" },
|
||||
{ "include": "#any-property" },
|
||||
{ "include": "#extends" },
|
||||
{ "include": "#parscal_class" }
|
||||
{ "include": "#pascal_case_class" }
|
||||
],
|
||||
"repository": {
|
||||
"comment": {
|
||||
@@ -328,11 +328,11 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"parscal_class": {
|
||||
"pascal_case_class": {
|
||||
"captures": {
|
||||
"1": { "name": "entity.name.type.class.gdscript" }
|
||||
},
|
||||
"match": "([A-Z][a-zA-Z_0-9]*)"
|
||||
"match": "\\b([A-Z][a-zA-Z_0-9]*)\\b"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "godot-tools",
|
||||
"displayName": "godot-tools",
|
||||
"icon": "icon.png",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Tools for game development with godot game engine",
|
||||
"repository": "https://github.com/godotengine/godot-vscode-plugin",
|
||||
"author": "The Godot Engine community",
|
||||
@@ -106,7 +106,7 @@
|
||||
"@types/ws": "^6.0.1",
|
||||
"tslint": "^5.16.0",
|
||||
"typescript": "^3.5.1",
|
||||
"@types/vscode": "^1.40.0"
|
||||
"@types/vscode": "^1.33.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"global": "^4.4.0",
|
||||
|
||||
@@ -68,10 +68,13 @@ export class GodotTools {
|
||||
const run_godot = (path: string, params: string) => {
|
||||
const escape_command = (cmd: string) => {
|
||||
let cmdEsc = `"${cmd}"`;
|
||||
const shell_plugin = vscode.workspace.getConfiguration("terminal.integrated.shell");
|
||||
let shell = shell_plugin ? shell_plugin.get("windows", "") || "" : "";
|
||||
if (shell.endsWith("powershell.exe") && process.platform === "win32") {
|
||||
cmdEsc = `&${cmdEsc}`;
|
||||
if (process.platform === "win32") {
|
||||
const POWERSHELL = "powershell.exe";
|
||||
const shell_plugin = vscode.workspace.getConfiguration("terminal.integrated.shell");
|
||||
let shell = (shell_plugin ? shell_plugin.get("windows", POWERSHELL) : POWERSHELL) || POWERSHELL;
|
||||
if (shell.endsWith(POWERSHELL)) {
|
||||
cmdEsc = `&${cmdEsc}`;
|
||||
}
|
||||
}
|
||||
return cmdEsc;
|
||||
};
|
||||
|
||||
@@ -82,7 +82,7 @@ export default class GDScriptLanguageClient extends LanguageClient {
|
||||
|
||||
connect_to_server() {
|
||||
this.status = ClientStatus.PENDING;
|
||||
io.connect_to_language_server();
|
||||
io.connect_to_language_server(get_server_uri());
|
||||
}
|
||||
|
||||
start(): vscode.Disposable {
|
||||
|
||||
@@ -12,11 +12,9 @@ export class MessageIO extends EventEmitter {
|
||||
writer: MessageIOWriter = null;
|
||||
|
||||
private socket: WebSocket = null;
|
||||
private url: string = "";
|
||||
|
||||
constructor(url: string) {
|
||||
super();
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public send_message(message: string) {
|
||||
@@ -39,10 +37,10 @@ export class MessageIO extends EventEmitter {
|
||||
this.emit("message", message);
|
||||
}
|
||||
|
||||
connect_to_language_server():Promise<void> {
|
||||
connect_to_language_server(url: string):Promise<void> {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.socket = null;
|
||||
const ws = new WebSocket(this.url);
|
||||
const ws = new WebSocket(url);
|
||||
ws.on('open', ()=>{ this.on_connected(ws); resolve(); });
|
||||
ws.on('message', this.on_message.bind(this));
|
||||
ws.on('error', this.on_disconnected.bind(this));
|
||||
|
||||
Reference in New Issue
Block a user