Fast Java language server
- Zero-hassle configuration.
- High editor performance.
- Adherence to the Language Server Protocol standard.
- CLI diagnostics for linting in CI/precommit.
- Small standalone binary with no external dependencies.
Pegon is available on pypi.
Use uvx to run a one-off lint check on your Java code:
uvx pegon checkOr install with uv or pip:
# with uv
uv tool install pegon@latest
# with pip
pip install pegoncargo install pegon~/.config/nvim/lsp/pegon.lua:
--- @type vim.lsp.Config
return {
cmd = { 'pegon', 'server' },
filetypes = { 'java' },
root_markers = { '.git' },
}~/.config/nvim/init.lua:
vim.lsp.enable({ 'pegon' })Install rmuir.pegon-vscode from the marketplace.
Install rmuir.pegon-vscode from Open VSX.
Q. This code looks like AI slop!
A. No LLM was used: if the code looks bad, it is because I wrote this application to learn Rust.
Q. What's with the Google Style?
A. Google Style supports high-performance Java development, and most developers roughly follow it:
- Single top-level class with matching
.javaname supports search, fuzzy-finder - Variable naming conventions support easier code review and understanding
- Import restrictions (e.g. no wildcards) support efficient analysis
Q. Where's completion / go-to-definition? I can't live without it!
A. These features are coming, continue to use ctags for now.
Q. Where's workspace symbol search? I can't live without it!
A. This feature is coming, I recommend a good fuzzy finder or ctags for now.
Q. What about running tests from my editor? This is essential for TDD!
A. I strongly recommend vim-test for this.
If your java build uses gradle, the daemon allows for very fast iteration with no config hassle. Black magic.
Q. Where's XYZ fancy refactoring? I can't live without it!
A. Currently the code actions are minimal. Check out some alternatives for now:
Q. What's with the name?
A. This program is named after the Javanese writing system. (ڤَيڮَون)
Special thanks to the open-source maintainers of the dependencies used.