Android Studio Development with JDTLS and Neovim with Mason-LSP #3006
Unanswered
GregoryShoemake
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey JDTLS Community, I'm trying to run the jdtls lsp in a neovim instance using Mason LSP with the intention of using it for Android development. There are a number of missing functionalities that make the LSP mostly useless that I can't seem to get working. Definitely a skill issue.
So the two major issues:
If I have:
private LocalDateTime ldt = LocalDateTime.now()
the .now() was presented by the completion engine, but if I reference ldt, the only completions offered are var~, null~, etc, which means variable tracking is not working.
Secondly, my package com.app.name has the following error:
ClassName.java is not on the classpath of project app, only syntax errors are reported.
What am I missing?
Here is my current java.lua configuration:
Also relevant LSP code:
Some log information:
:LspInfo
lsp.log
[ERROR][2023-12-27 09:32:10] ...lsp/handlers.lua:535 "Dec 27, 2023, 9:32:10 AM src/main/java/com/app(*changed)/package(*changed) [in app] does not exist\nsrc/main/java/com/app(*changed)/package(*changed) [in app] does not exist\nJava Model Exception: Error in Java Model (code 969): src/main/java/com/app(*changed)/package(*changed) [in app] does not exist\r\n\tat org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:550)\r\n\tat org.eclipse.jdt.internal.core.PackageFragmentRoot.getUnderlyingResource(PackageFragmentRoot.java:761)\r\n\tat org.eclipse.jdt.internal.core.PackageFragment.getUnderlyingResource(PackageFragment.java:426)\r\n\tat org.eclipse.jdt.internal.core.Openable.getUnderlyingResource(Openable.java:349)\r\n\tat org.eclipse.jdt.internal.core.CompilationUnit.getUnderlyingResource(CompilationUnit.java:986)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.BaseDiagnosticsHandler.collectNonJavaProblems(BaseDiagnosticsHandler.java:149)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.BaseDiagnosticsHandler.endReporting(BaseDiagnosticsHandler.java:135)\r\n\tat org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.reportProblems(ReconcileWorkingCopyOperation.java:148)\r\n\tat org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:112)\r\n\tat org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:740)\r\n\tat org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:806)\r\n\tat org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1325)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler.publishDiagnostics(BaseDocumentLifeCycleHandler.java:325)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler.publishDiagnostics(BaseDocumentLifeCycleHandler.java:288)\r\n\tat org.eclipse.jdt.ls.core.internal.handlers.BaseDocumentLifeCycleHandler$PublishDiagnosticJob.run(BaseDocumentLifeCycleHandler.java:734)\r\n\tat org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)\r\n"
Much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions