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-java--get-root is called too early #6

Closed
smarter opened this issue May 9, 2017 · 1 comment
Closed

lsp-java--get-root is called too early #6

smarter opened this issue May 9, 2017 · 1 comment

Comments

@smarter
Copy link

smarter commented May 9, 2017

Loading lsp-java causes (lsp-define-stdio-client 'java-mode "java" ...) to be evaluated, one of the argument of this function is (lsp-java--ls-command), which in turn will call (lsp-java--get-root), which will return the current directory at whatever point lsp-java has been loaded, instead of when the lsp-mode has been enabled. If you use emacs in server mode and eagerly load lsp-java in your config, you will likely see Couldn’t find java root, using:/ in your logs.
It seems that lsp-define-stdio-client needs to be changed to take a function that returns the command used for running the server, instead of a list of strings.

@yyoncho
Copy link
Member

yyoncho commented May 8, 2018

The issue is no longer reproducible with the latest code since the project roots are specified explicitly and if the project is not under project root the project root directory will default to default-directory. Marking as closed, please reopen it if you are able to hit the issue with the latest code.

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

No branches or pull requests

2 participants