Skip to content

rmuir/pegon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

748 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pegon

Fast Java language server

Features

  • 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.

Install

Binaries

Pegon is available on pypi.

Use uvx to run a one-off lint check on your Java code:

uvx pegon check

Or install with uv or pip:

# with uv
uv tool install pegon@latest
# with pip
pip install pegon

Install from Source

cargo install pegon

Editor Setup

Neovim

~/.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' })

VSCode

Install rmuir.pegon-vscode from the marketplace.

VSCodium, Cursor, etc

Install rmuir.pegon-vscode from Open VSX.

Docs

FAQ

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 .java name 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. (ڤَيڮَون)

Thanks

Special thanks to the open-source maintainers of the dependencies used.

About

Fast Java language server

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors