Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default LSP Port for Godot 4's one #469

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
},
"godotTools.lsp.serverPort": {
"type": "number",
"default": 6008,
"default": 6005,
"description": "The server port of the GDScript language server"
},
"godotTools.editorPath": {
Expand Down
8 changes: 4 additions & 4 deletions src/godot-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ export class GodotTools {
}

private check_client_status() {
let host = get_configuration("lsp.serverPort", "localhost");
let port = get_configuration("lsp.serverHost", 6008);
let host = get_configuration("lsp.serverHost", "localhost");
let port = get_configuration("lsp.serverPort", 6005);
switch (this.client.status) {
case ClientStatus.PENDING:
vscode.window.showInformationMessage(`Connecting to the GDScript language server at ${host}:${port}`);
Expand All @@ -247,7 +247,7 @@ export class GodotTools {

private on_client_status_changed(status: ClientStatus) {
let host = get_configuration("lsp.serverHost", "localhost");
let port = get_configuration("lsp.serverPort", 6008);
let port = get_configuration("lsp.serverPort", 6005);
switch (status) {
case ClientStatus.PENDING:
this.connection_status.text = `$(sync) Connecting`;
Expand Down Expand Up @@ -302,7 +302,7 @@ export class GodotTools {
this.connection_status.tooltip = `Disconnected from the GDScript language server.`;

let host = get_configuration("lsp.serverHost", "localhost");
let port = get_configuration("lsp.serverPort", 6008);
let port = get_configuration("lsp.serverPort", 6005);
let message = `Couldn't connect to the GDScript language server at ${host}:${port}. Is the Godot editor running?`;
vscode.window.showErrorMessage(message, "Open Godot Editor", "Retry", "Ignore").then(item => {
if (item == "Retry") {
Expand Down
2 changes: 1 addition & 1 deletion src/lsp/GDScriptLanguageClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class GDScriptLanguageClient extends LanguageClient {
connect_to_server() {
this.status = ClientStatus.PENDING;
let host = get_configuration("lsp.serverHost", "127.0.0.1");
let port = get_configuration("lsp.serverPort", 6008);
let port = get_configuration("lsp.serverPort", 6005);
this.io.connect_to_language_server(host, port);
}

Expand Down