Compare commits

..

8 Commits

Author SHA1 Message Date
Geequlim
2a467ed990 Release version 1.0.1 2020-01-30 00:12:21 +08:00
Geequlim
60937ad776 Fix run editor error on windows with default terminal configurations 2020-01-30 00:11:23 +08:00
Geequlim
0ac1299f47 Release 1.0.0 2020-01-29 20:44:33 +08:00
Geequlim
cf22aa3595 Merge pull request #138 from sevkin/137
check before calling platform-specific code
2020-01-26 16:27:00 +08:00
Vsevolod Balashov
c41bd642f0 check before calling platform-specific code
closes #137
2020-01-26 02:29:34 +03:00
geequlim
8d8f5c2d9b Support reconnect to language server when server port changed 2020-01-12 00:00:17 +08:00
Geequlim
119a7ebd23 Merge pull request #134 from Bromeon/bugfix/highlight-camel-case
Fix syntax highlighting for camelCase identifiers
2020-01-10 23:54:50 +08:00
Jan Haller
555cb1ce9a Fix syntax highlighting for camelCase identifiers
Currently, any occurrences of PascalCase identifiers (even as parts of other words) are recognized as classes.
This assumes snake_case convention for all methods and variables and makes it impossible to use camelCase. While this is the recommended GDScript style, the syntax highlighter should allow for different styles as long as it can do so unambiguously. This is already done for existing rules, but overridden by one rule with an overly general regex pattern.

This commit modifies the catch-all rule for the 'parscal_class' group to only capture whole words.
For clarity, it renames 'parscal_class' to 'pascal_case_class'.

Other groups to recognize classes remain unchanged: type_declear, function-return-type, class_def, class_new, class_is, class_enum, class_name, extends
2019-12-29 18:00:31 +01:00
6 changed files with 18 additions and 14 deletions

View File

@@ -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.

View File

@@ -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"
}
}
}

View File

@@ -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",

View File

@@ -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;
};

View File

@@ -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 {

View File

@@ -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));