-
Notifications
You must be signed in to change notification settings - Fork 91
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
Multi module maven project #159
Comments
You may try import only a limited set of services e. g. do not import the root and then either put .projectile in the service root. If this is not an option and JDT LS parsing is taking a lot of time, I do not think that there is anything that we can do on emacs side but we should report the issue upstream. IIRC there was a user that reported that he successfully uses lsp-java on 6000+. |
Thanks, I've tried that already, however by doing so I cannot jump to file definitions outside of the root. And sometimes that is needed. Unless I'm missing something? |
It should be possible to make it work if the other projects are compiled and their source is available in the local .m2 repository. Also, it is possible to attach the source locations in jdtls but this is not exposed in lsp-java - #71 |
Yeah I usually build the project at first to make sure all sources are generated. I'll give this a try. Any plans on implementing the "attach source" feature? |
Not in the next few weeks, but if you want to give it a hit feel free to ping me. |
Thanks, I doubt my Lisp can be of any help here, but I can sure give it a try on my spare time. |
see redhat-developer/vscode-java#1084 and corresponding PR eclipse-jdtls/eclipse.jdt.ls#1200 |
Nice, when can we expect this added to lsp-mode/lsp-java ? |
First, the PR should be merged in jdt ls and then it is a single liner in lsp-java - register the configuration settings like we register the rest of the configuration settings. |
The PR has been merged |
Here it is a guide how to expose server property: https://github.com/emacs-lsp/lsp-mode#sections |
What was the resolution to this? I have a similar large multi module project but I don't want lsp context to switch every time I open a file in a submodule. How do I pin the root(parent) folder as project root for the project? I haven't found a good solution for this online. |
@nipuna-perera you can import the folder containing the root pom and it should work. |
I tried that. It didn't work. I deleted the lsp-session file, then when I was prompted, I chose "Interactively select root". Then picked |
I was wondering what is the best way to setup lsp-java in a multi module maven project. It is a mono repo with about 50 services in it, each configured as maven project. I was able to setup the root as the main root of the whole project (the parent maven config), however it takes a while to index all the files and most of the time it throws an "out of memory" error. Increasing the heap size of the VM helps to avoid this problem, however it still takes a long time to build the workspace, during which most of the features I benefit from using lsp-java are unusable.
I also disabled file watchers to speed up the process. For reference, using IntelliJ rarely lags.
I appreciate my project has a lot of files and the process of indexing them all is inevitably slower, but Is there anything I can do to help speed up the process at all?
p.s.: thanks for the great work!
The text was updated successfully, but these errors were encountered: