mirror of
https://github.com/godotengine/godot-vscode-plugin.git
synced 2026-01-05 14:10:13 +03:00
Compare commits
5 Commits
1.0-beta2
...
1.0.0-stab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cf22aa3595 | ||
|
|
c41bd642f0 | ||
|
|
8d8f5c2d9b | ||
|
|
119a7ebd23 | ||
|
|
555cb1ce9a |
@@ -27,7 +27,7 @@
|
|||||||
{ "include": "#any-method" },
|
{ "include": "#any-method" },
|
||||||
{ "include": "#any-property" },
|
{ "include": "#any-property" },
|
||||||
{ "include": "#extends" },
|
{ "include": "#extends" },
|
||||||
{ "include": "#parscal_class" }
|
{ "include": "#pascal_case_class" }
|
||||||
],
|
],
|
||||||
"repository": {
|
"repository": {
|
||||||
"comment": {
|
"comment": {
|
||||||
@@ -328,11 +328,11 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"parscal_class": {
|
"pascal_case_class": {
|
||||||
"captures": {
|
"captures": {
|
||||||
"1": { "name": "entity.name.type.class.gdscript" }
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export class GodotTools {
|
|||||||
let cmdEsc = `"${cmd}"`;
|
let cmdEsc = `"${cmd}"`;
|
||||||
const shell_plugin = vscode.workspace.getConfiguration("terminal.integrated.shell");
|
const shell_plugin = vscode.workspace.getConfiguration("terminal.integrated.shell");
|
||||||
let shell = shell_plugin ? shell_plugin.get("windows", "") || "" : "";
|
let shell = shell_plugin ? shell_plugin.get("windows", "") || "" : "";
|
||||||
if (shell.endsWith("powershell.exe") && process.platform === "win32") {
|
if (process.platform === "win32" && shell.endsWith("powershell.exe")) {
|
||||||
cmdEsc = `&${cmdEsc}`;
|
cmdEsc = `&${cmdEsc}`;
|
||||||
}
|
}
|
||||||
return cmdEsc;
|
return cmdEsc;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ export default class GDScriptLanguageClient extends LanguageClient {
|
|||||||
|
|
||||||
connect_to_server() {
|
connect_to_server() {
|
||||||
this.status = ClientStatus.PENDING;
|
this.status = ClientStatus.PENDING;
|
||||||
io.connect_to_language_server();
|
io.connect_to_language_server(get_server_uri());
|
||||||
}
|
}
|
||||||
|
|
||||||
start(): vscode.Disposable {
|
start(): vscode.Disposable {
|
||||||
|
|||||||
@@ -12,11 +12,9 @@ export class MessageIO extends EventEmitter {
|
|||||||
writer: MessageIOWriter = null;
|
writer: MessageIOWriter = null;
|
||||||
|
|
||||||
private socket: WebSocket = null;
|
private socket: WebSocket = null;
|
||||||
private url: string = "";
|
|
||||||
|
|
||||||
constructor(url: string) {
|
constructor(url: string) {
|
||||||
super();
|
super();
|
||||||
this.url = url;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public send_message(message: string) {
|
public send_message(message: string) {
|
||||||
@@ -39,10 +37,10 @@ export class MessageIO extends EventEmitter {
|
|||||||
this.emit("message", message);
|
this.emit("message", message);
|
||||||
}
|
}
|
||||||
|
|
||||||
connect_to_language_server():Promise<void> {
|
connect_to_language_server(url: string):Promise<void> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.socket = null;
|
this.socket = null;
|
||||||
const ws = new WebSocket(this.url);
|
const ws = new WebSocket(url);
|
||||||
ws.on('open', ()=>{ this.on_connected(ws); resolve(); });
|
ws.on('open', ()=>{ this.on_connected(ws); resolve(); });
|
||||||
ws.on('message', this.on_message.bind(this));
|
ws.on('message', this.on_message.bind(this));
|
||||||
ws.on('error', this.on_disconnected.bind(this));
|
ws.on('error', this.on_disconnected.bind(this));
|
||||||
|
|||||||
Reference in New Issue
Block a user