talira

Java Language Server

A Java language server built on the Java compiler API, for VS Code, Vim, Emacs, Kate and Sublime

open sourceMITfree

A Java language server that uses the Java compiler API (javac) for autocomplete with auto-import, signature help, Javadoc and type information on hover, go-to-definition, find references, workspace and document symbols, lint errors and debugging tests. It finds external dependencies from pom.xml or Bazel, or from settings that name Maven coordinates or a class path. It ships as the VS Code extension Java Language Support, and other editors (Vim with vim-lsc, Emacs with Eglot, Kate, Sublime Text with LSP) run it after building it from the repository with Maven. MIT licensed.

Problems it solves

  • get Java autocomplete and go-to-definition in Vim or Emacs
  • a lightweight Java language server that doesn't need Eclipse
  • Java code intelligence in my editor using the JDK's own compiler

Features

  • autocomplete with auto-import
  • signature help, Javadoc and type information on hover
  • go-to-definition, find references and symbol search
  • lint errors from the Java compiler
  • debugging tests
  • dependencies from pom.xml, Bazel or settings

Limitations

  • Outside VS Code it is built from the repository with Maven; there is no packaged release for other editors1
  • Not compatible with vim-lsp, which supports only LSP 2.01

Alternatives

The same job

These do what Java Language Server does.

  1. Eclipse JDT Language Server A Java language server that works with any editor speaking the Language Server Protocol
  2. gopls The language server for Go
  3. PowerShell Editor Services The PowerShell language server and debug adapter for any editor
  4. rust-analyzer Bringing a great IDE experience to the Rust programming language
  5. clangd clangd understands your C++ code and adds smart features to your editor
  6. Metals Scala language server with rich IDE features

Compare Java Language Server with the top 3