← All extensions

hledger

v0.1.3 · by Denis Evsyukov · added 3 November 2026

Plain-text accounting with hledger: syntax highlighting and LSP support

LanguagesLanguage servers

How to install

With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.

You can also open the Extensions panel in the app and search for hledger. The extension's id is hledger.

Don't have Forge Super yet? Download it here.

README

From the extension's repository, written by its authors and not by Mentenaz. See the source.

hledger-zed

Zed extension for hledger journal files with LSP integration.

Features

  • LSP support via hledger-lsp:
    • Syntax highlighting via semantic tokens
    • Autocompletion for accounts and commodities
    • Hover information
    • Diagnostics for unbalanced transactions
    • Go to definition
    • Document formatting
  • Support for .journal, .hledger, .ledger, and .rules files

Installation

From Zed Extensions

  1. Open Zed
  2. Go to Extensions (Cmd+Shift+X on macOS)
  3. Search for "hledger"
  4. Click Install

Manual Installation

  1. Clone this repository
  2. Open Zed and go to Extensions
  3. Click "Install Dev Extension" and select the cloned directory

LSP Binary

The extension automatically downloads hledger-lsp from GitHub Releases when needed.

If you prefer to install it manually:

# Using Go
go install github.com/juev/hledger-lsp@latest

# Or download from releases
# https://github.com/juev/hledger-lsp/releases

Configuration

Configure the LSP in your Zed settings.json:

{
  "lsp": {
    "hledger-lsp": {
      "binary": {
        "path": "/custom/path/to/hledger-lsp"
      },
      "initialization_options": {
        "hledger": {
          "features": {
            "hover": true,
            "completion": true,
            "formatting": true,
            "diagnostics": true,
            "semanticTokens": true,
            "codeActions": true,
            "foldingRanges": true,
            "documentLinks": true,
            "workspaceSymbol": true,
            "inlineCompletion": true,
            "codeLens": false
          },
          "completion": {
            "maxResults": 50,
            "fuzzyMatching": true,
            "showCounts": true,
            "includeNotes": true
          },
          "diagnostics": {
            "undeclaredAccounts": true,
            "undeclaredCommodities": true,
            "unbalancedTransactions": true,
            "balanceTolerance": 0.0
          },
          "formatting": {
            "indentSize": 4,
            "alignAmounts": true,
            "minAlignmentColumn": 40
          },
          "cli": {
            "enabled": true,
            "path": "hledger",
            "timeout": 30000
          },
          "limits": {
            "maxFileSizeBytes": 10485760,
            "maxIncludeDepth": 50
          }
        }
      }
    }
  }
}

Settings Reference

Features
SettingDefaultDescription
features.hovertrueHover information
features.completiontrueCompletions
features.formattingtrueDocument formatting
features.diagnosticstrueDiagnostics
features.semanticTokenstrueSemantic tokens
features.codeActionstrueCode actions
features.foldingRangestrueFolding ranges for transactions and directives
features.documentLinkstrueClickable links for include directives
features.workspaceSymboltrueWorkspace symbol search
features.inlineCompletiontrueGhost text completions for transaction templates
features.codeLensfalseBalance check indicators on transactions
Completion
SettingDefaultDescription
completion.maxResults50Maximum number of completion items
completion.fuzzyMatchingtrueEnable fuzzy matching
completion.showCountstrueShow usage counts in completion details
completion.includeNotestrueInclude notes in payee completions
Diagnostics
SettingDefaultDescription
diagnostics.undeclaredAccountstrueReport undeclared accounts
diagnostics.undeclaredCommoditiestrueReport undeclared commodities
diagnostics.unbalancedTransactionstrueReport unbalanced transactions
diagnostics.balanceTolerance0.0Tolerance for balance checks (0 = exact)
Formatting
SettingDefaultDescription
formatting.indentSize4Number of spaces for posting indent
formatting.alignAmountstrueAlign amounts across postings
formatting.minAlignmentColumn40Minimum column for amount alignment (0 = auto)
CLI
SettingDefaultDescription
cli.enabledtrueEnable hledger CLI integration
cli.path"hledger"Path to hledger executable
cli.timeout30000CLI command timeout in milliseconds
Limits
SettingDefaultDescription
limits.maxFileSizeBytes10485760Maximum journal file size (bytes)
limits.maxIncludeDepth50Maximum include depth for recursive loading

Syntax Highlighting

Basic syntax highlighting is provided by the built-in tree-sitter grammar and works out of the box with any Zed theme — no LSP required.

For enhanced highlighting, enable semantic tokens from hledger-lsp by adding the following to your settings.json:

{
  "languages": {
    "hledger": {
      "semantic_tokens": "full"
    },
    "hledger-rules": {
      "semantic_tokens": "full"
    }
  }
}

Supported File Extensions

  • .journal
  • .hledger
  • .ledger
  • .rules (CSV import rules)

Development

Prerequisites

  • Rust
  • wasm32-wasip1 target: rustup target add wasm32-wasip1

Building

cargo build --target wasm32-wasip1 --release

Testing Locally

  1. Build the extension
  2. Open Zed → Extensions → Install Dev Extension
  3. Select this directory
  4. Open a .journal file to test

License

MIT