Skip to content

refactor(lsp): add JavaLanguageServer gateway seam for future servers - #335

Draft
rcasia wants to merge 4 commits into
mainfrom
feat/lsp-gateway-refactor
Draft

rcasia wants to merge 4 commits into
mainfrom
feat/lsp-gateway-refactor

Conversation

@rcasia

@rcasia rcasia commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Pure refactor (no behavior change) preparing for #314 (IntelliJ LSP).

Introduces a single replaceable seam, JavaLanguageServer (lua/neotest-java/core/language_server/), exposing exactly three domain methods:

  • get_java_home(cwd) (was inline java.project.getSettings in command/binaries.lua)
  • get_classpath(base_dir, extra?) (was inline java.project.getClasspaths in classpath_provider.lua)
  • compile(opts) (was inline java/buildWorkspace in lsp_compiler.lua)

The jdtls side is three single-purpose resolvers behind a thin facade; Binaries, ClasspathProvider, and LspCompiler are now thin delegates with unchanged signatures. Public DI gains one optional language_server override (explicit component overrides still win per-concern; legacy client_provider composes into the default jdtls gateway), so existing configs work unchanged.

A future IntelliJ implementation only adds a gateway with the same three methods — no changes to SpecBuilder/MethodIdResolver.

Checks: make test green, stylua --check, luacheck, lua-language-server --check clean.

@rcasia
rcasia marked this pull request as ready for review September 23, 2026 10:57
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.

1 participant