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

LSP: Add support for custom host setting #52330

Merged

Conversation

johnjdonna
Copy link

@johnjdonna johnjdonna commented Sep 1, 2021

You can now set host in the language_server settings in the editor settings. I am also making a pull request to make changes to the VSCode godot-tools to be able to set the language_server host as well.

This allows you to connect to the godot language_server when using WSL2 and docker.

This is a link to the pull request in the vscode plugin
godotengine/godot-vscode-plugin#297

@johnjdonna johnjdonna requested a review from a team as a code owner September 1, 2021 23:00
@johnjdonna
Copy link
Author

@Calinou I'm unsure if the changes went through, do I need to make these changes in my personal fork branch?

vnen
vnen previously requested changes Sep 10, 2021
Copy link
Member

@vnen vnen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a small fix, otherwise looks good. Also needs to squash all the commits (see the documentation for info about this).

port = (int)_EDITOR_GET("network/language_server/remote_port");
use_thread = (bool)_EDITOR_GET("network/language_server/use_thread");
if (protocol.start(port, IPAddress("127.0.0.1")) == OK) {
if (protocol.start(port, IP_Address(host)) == OK) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems you are using an outdated version, this was renamed to IPAddress (without underscore) a while ago.

Suggested change
if (protocol.start(port, IP_Address(host)) == OK) {
if (protocol.start(port, IPAddress(host)) == OK) {

You can now configure host in the `language_server` settings in the editor
settings.
@akien-mga akien-mga force-pushed the add_support_hostname_language_server branch from ec7a08a to be6da39 Compare September 20, 2021 11:10
@akien-mga
Copy link
Member

Force pushed a rebase to squash commits and fix the build issue.

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 20, 2021
@akien-mga akien-mga changed the title language_server supports host LSP: Add support for custom host setting Sep 20, 2021
@akien-mga akien-mga dismissed stale reviews from vnen and Calinou September 20, 2021 11:28

Changes done.

@akien-mga akien-mga merged commit a92c58e into godotengine:master Sep 20, 2021
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.4.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants