8000 GitHub - ag-libs/lathe · GitHub
[go: up one dir, main page]

Skip to content
ag-libsPublic

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

38 stars

Watchers

1 watching

Forks

Latest commit

 

History

2,562 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lathe

Maven Central CI

A Java language server that gets its project setup from your build. No project import, no classpath configuration.

Lathe demo: completion, diagnostics, running, debugging and testing in Neovim

Why Lathe

Most Java language servers build their own model of your project, and it drifts from what your build actually does. Lathe doesn't keep a separate model. When you build, Lathe records how the build compiles, tests and runs each module, and the editor uses exactly that.

  • The editor agrees with your build. Errors come from the JDK's own compiler with your build's flags. Modular projects, annotation processors, generated sources and Lombok work without extra setup.
  • Run, test and debug without rebuilding. Lathe runs your main methods and tests the way your build runs them (same classpath, module path and flags), from the classes it already compiled. This is in the Neovim client today.
  • Works across the whole project. Navigation, references and rename cover every module, and navigation also steps into your dependencies' sources and the JDK's.
  • Refactors the compiler checks. Extract method, variable, constant and field, and rename across every module; extract method compiles its result before you apply it.
  • Keeps up with outside changes. After a branch switch, a git pull or an AI agent's edits, Lathe recompiles the changed files on its own.
  • Gives AI agents the same view. An MCP server lets coding agents use the compiler's answers instead of guessing with grep.

See the full feature list, or the Neovim keymap reference for each feature with its default and suggested key.

Quick start

You need Java 17+, and Maven 3.6.3+ or Gradle 8.8+ (see the requirements for Maven and Gradle).

1. Add Lathe to your build. Maven: put this in .mvn/extensions.xml at the root of your project (or under <build><extensions> in the root pom.xml):

<extensions>
  <extension>
    <groupId>io.github.ag-libs</groupId>
    <artifactId>lathe-maven-extension</artifactId>
    <version>0.3.1</version>
  </extension>
</extensions>

Gradle: apply the settings plugin in settings.gradle.kts:

plugins {
    id("io.github.ag-libs.lathe") version "0.3.1"
}

2. Build once. This records your project's setup without running the tests:

mvn clean test -Dlathe.capture.               # Maven
./gradlew latheSync -Plathe.capture.          # Gradle

Add .lathe/ to your .gitignore. After this, every normal build keeps Lathe up to date.

3. Set up your editor using its guide below.

More options, including setup without the extension and Gradle's personal init script, are in the Maven and Gradle guides.

Editors

Editor Support Guide
Neovim Full client: LSP plus run, test, debug and new-type scaffolding Neovim · example config
VS Code / Cursor "Lathe for Java" extension (.vsix on each release, preview, standard LSP) VS Code
Emacs Built-in Eglot, no plugin needed Emacs
Zed The Java extension, plus one settings file Zed

Lathe is a standard language server, so other LSP clients can use it too.

AI agents

lathe-mcp-server gives coding agents such as Claude Code the same analysis over the Model Context Protocol. Agents can check diagnostics, find references, rename across modules, run tests, and verify a change without a full build. See the AI agents guide.

Status

Lathe is in active development and published to Maven Central.

  • Builds: Maven, Gradle, and the OpenJDK make build.
  • Platforms: Linux, macOS and Windows 10/11. On Windows, use VS Code, Cursor or Zed.
  • Editors: Neovim has the full feature set. The other editors get the standard LSP features; run, test and debug are Neovim-only for now.

What works today, in detail, is in status.

Documentation

Contributing

Feedback, bug reports, and questions are welcome: please open an issue. Lathe isn't accepting code contributions at the moment, so please open an issue rather than a pull request; see CONTRIBUTING.md. Thank you for trying Lathe.

Lathe is developed with AI coding tools, mainly Claude Code. A maintainer reviews every change and takes responsibility for it, and AI-assisted commits carry a Co-Authored-By trailer. This follows the Apache Software Foundation's guidance on generative tools.

License

Apache License 2.0

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

38 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0