hledger-lsp

module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT

README ΒΆ

hledger-lsp

Go Version License Release coverage

A Language Server Protocol (LSP) implementation for hledger journal files. Provides IDE features like completions, diagnostics, formatting, and more for any LSP-compatible editor.

🎯 Features

Completions
  • Accounts β€” Fuzzy matching with frequency-based ranking
  • Payees β€” With transaction templates (auto-inserts postings)
  • Commodities β€” From directives and usage
  • Tags β€” Name and value completion from existing tags
  • Dates β€” today/yesterday/tomorrow + historical dates from file
Navigation
  • Go to Definition β€” Jump to account/commodity/payee declaration
  • Find References β€” Find all usages across workspace
Diagnostics
  • Real-time validation of transactions
  • Balance checks and syntax errors
Other
  • Formatting β€” Automatic alignment of amounts
  • Hover β€” Account balances on hover
  • Semantic Tokens β€” Syntax highlighting
  • Document Symbols β€” Outline navigation
  • Include Support β€” Multi-file journals with cycle detection

πŸ“¦ Installation

From Releases

Download the latest binary for your platform from GitHub Releases.

# macOS (Apple Silicon)
curl -L https://github.com/juev/hledger-lsp/releases/latest/download/hledger-lsp_darwin_arm64 -o hledger-lsp
chmod +x hledger-lsp
sudo mv hledger-lsp /usr/local/bin/

# macOS (Intel)
curl -L https://github.com/juev/hledger-lsp/releases/latest/download/hledger-lsp_darwin_amd64 -o hledger-lsp
chmod +x hledger-lsp
sudo mv hledger-lsp /usr/local/bin/

# Linux (x86_64)
curl -L https://github.com/juev/hledger-lsp/releases/latest/download/hledger-lsp_linux_amd64 -o hledger-lsp
chmod +x hledger-lsp
sudo mv hledger-lsp /usr/local/bin/
From Source
go install github.com/juev/hledger-lsp/cmd/hledger-lsp@latest
Verify Installation
hledger-lsp --version

πŸš€ Quick Start

  1. Install hledger-lsp (see above)
  2. Configure your editor (see below)
  3. Open a .journal or .hledger file
  4. Start typing and enjoy completions!
2024-01-15 * grocery store
    expenses:food  $50.00
    assets:cash

πŸ”§ Editor Setup

βš™οΈ Configuration

See docs/configuration.md for supported settings and defaults.

βš™οΈ Supported Features

Feature Status
Completions βœ…
Diagnostics βœ…
Formatting βœ…
Hover βœ…
Semantic Tokens βœ…
Document Symbols βœ…
Go to Definition βœ…
Find References βœ…

πŸ“š Resources

πŸ“„ License

MIT Β© Denis Evsyukov

Directories ΒΆ

Path Synopsis
cmd
hledger-lsp command
internal
ast
cli
lsputil
Package lsputil provides UTF-8/UTF-16 position mapping utilities for LSP.
Package lsputil provides UTF-8/UTF-16 position mapping utilities for LSP.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL