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

Fix eclipselsp workspace config #2520

Merged
merged 1 commit into from
May 23, 2019

Conversation

hsanson
Copy link
Contributor

@hsanson hsanson commented May 21, 2019

Fixes command line used to start eclipselsp to set workspace correctly. Also adds a conf variable to set a specific eclipse workspace path.

Fixes #2519

ale_linters/java/eclipselsp.vim Outdated Show resolved Hide resolved
@GrimKriegor
Copy link
Contributor

GrimKriegor commented May 21, 2019

@hsanson Thank you so much for this.

I have spent hours and hours trying to figure out what was wrong with my setup and after I posted this you came up with a solution right away.

Just tested pulling these changes and opening up a Java+Gradle project and can confirm Gradle gets triggered, the dependencies get downloaded and third-party libraries now have auto-completion and hover support.

Keep up the good work!

@w0rp
Copy link
Member

w0rp commented May 21, 2019

You'll have to rebase this now. While you're at it, add ale#Escape() to all of the paths used in the command, or the command can fail if any of the paths contain spaces, etc.

We were setting the -data parameter to the project root but this caused
the language server to fail initialization and synch of gradle
dependencies. As consequence ALE failed to work fully on gradle
projects.

This fix sets the workspace to the parent folder of the project root.
Normally this corresponds to the correct Eclipse workspace path.

When this is not the case, this fix also allows users to explicitly set
the absolute path to the workspace via configuration variable.
@hsanson hsanson force-pushed the fix-eclipselsp-workspace-config branch from d6c3340 to 5a8ba75 Compare May 22, 2019 00:35
@hsanson
Copy link
Contributor Author

hsanson commented May 22, 2019

@GrimKriegor thanks for reporting. This allows me to find out issues that require attention.

@hsanson
Copy link
Contributor Author

hsanson commented May 22, 2019

@w0rp rebased and added ale#Escape() to all paths in the command.

@w0rp
Copy link
Member

w0rp commented May 23, 2019

I'll merge this, though I have a question. If the workspace path is empty, and we pass -data '' to the command, will it still work? If it doesn't, we should probably check if the workspace path is empty and return '' so no command is run instead.

@w0rp w0rp merged commit 1a9b8a5 into dense-analysis:master May 23, 2019
@w0rp
Copy link
Member

w0rp commented May 23, 2019

Cheers! 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eclipselsp fails to correctly initialize/sync gradle projects.
3 participants