Bazel unavailable if a pom.xml also exists
InferConfig figures out the classpath based on a few heuristics[0]. Due to the ordering (and probably popularity), pom.xml is checked before bazel's WORKSPACE. This renders bazel java projects that have a pom.xml for deployment purposes unable to be used.
It would be nice to be able to optionally hint to java-language-server which project type you have to handle situations like this.
[0] https://github.com/georgewfraser/java-language-server/blob/43ffea436b9b726eb8d6721605e9c437333105b9/src/main/java/org/javacs/InferConfig.java#L51-60
As a workaround for now, have your editor explicitly specify the Java classpath and documentation path using JSON settings. See the README.md file for details. Doing so turns off the inference process and makes the language server start more quickly.
This is what I was doing until it got annoying enough to just fork locally to prefer bazel over maven. Would you be interested in a PR for a JSON setting that InferConfig could take into account (or something calling InferConfig could process and skip using InferConfig)?