r/neovim • • 1d ago

Plugin lathe.nvim: a Java language server that takes its settings from your build

Post image

Lathe 0.4.0 is out. I posted about an earlier version here, so this is an update for anyone who missed it or wanted to try it.

Lathe is a Java language server with a first class Neovim support. Instead of building its own model of your project, it takes the compiler settings from your build and uses javac, so the editor sees your code the way the build does. Disclosure: Lathe is largely written by AI coding agents, and I review every change.

You don't need to change your build to try it: install lathe.nvim, open a Java file and run :LatheInit. You get completion, compiler errors, navigation and refactoring, plus run, test and debug (with neotest and nvim-dap).

0.4.0 supports Maven 3.6.3+, Gradle 8.8+, the OpenJDK build, runs on JDK 17+, and picks up the formatter your build uses.

Neovim 0.12+ on Linux or macOS. Beta, open source.

Plugin: https://github.com/ag-libs/lathe.nvim
Docs: https://github.com/ag-libs/lathe
Comparison with JDT LS: https://github.com/ag-libs/lathe#compared-with-jdt-ls

If you try it on your project, I'd like to hear how it goes.
Thank you for reading.

46 Upvotes

7 comments sorted by

1

u/eshepelyuk 23h ago

I should have asked AI, but does it work only with Java files or Groovy also supported ? At least method auto complation in groovy files, e.g. Spock tests ?

1

u/ForeignCherry2011 18h ago

Only Java

0

u/eshepelyuk 18h ago

is there any chance to make it work also for groovy ?

1

u/ForeignCherry2011 17h ago

It is technically possible. The Groovy compiler has an open API, and there seems to be a library implementing the lsp protocol.

May ask you to create an issue for Lathe on GitHub?