No description
  • C 87.9%
  • C++ 8.3%
  • JavaScript 3.3%
  • Tree-sitter Query 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-16 00:52:28 +00:00
.claude Updating docs 2026-03-14 01:53:17 +00:00
.vscode Update CHANGELOG for v0.1.4 2026-03-15 13:51:32 +00:00
docs Updating docs 2026-03-14 01:53:17 +00:00
queries Working defintion 2026-03-15 13:36:48 +00:00
src updating grammar 2026-03-16 00:52:14 +00:00
test/corpus updating grammar 2026-03-16 00:52:14 +00:00
.gitignore cleaning 2026-03-15 13:51:09 +00:00
CHANGELOG.md Update CHANGELOG for v0.1.6 2026-03-16 00:52:28 +00:00
grammar.js updating grammar 2026-03-16 00:52:14 +00:00
index.md adding index 2026-03-14 10:24:51 +00:00
package-lock.json Add tree-sitter grammar for Go-Luca accounting files 2026-03-02 13:14:17 +00:00
package.json Add tree-sitter grammar for Go-Luca accounting files 2026-03-02 13:14:17 +00:00
README.md Updating docs 2026-03-14 01:53:17 +00:00
task-plus.yml Updating docs 2026-03-14 01:53:17 +00:00
Taskfile.yml updating grammar 2026-03-16 00:52:14 +00:00
tree-sitter.json Add tree-sitter grammar for Go-Luca accounting files 2026-03-02 13:14:17 +00:00

tree-sitter-goluca

Tree-sitter grammar for Go-Luca accounting files (.goluca).

Provides parsing, syntax highlighting, and editor integration for the Go-Luca double-entry transaction format.

Go-Luca format

Each transaction has a header line (date, flag, optional payee) followed by one or more movement lines. Movements transfer an amount from one account to another.

# Comment
2026-02-07 * Dividend payment
  Asset:Cash → Equity:Capital "Dividend" 200 GBP

2026-02-01 * Payroll
  +Income:Salary → Asset:Bank "net salary" 4,000.00 GBP
  +Income:Salary → Expense:Tax "income tax" 1,000.00 GBP

2026-03-01 ! Awaiting confirmation
  Asset:Bank → Expense:Food "lunch" 15.50 GBP

Grammar elements

Element Pattern Example
date YYYY-MM-DD 2026-02-07
flag * (cleared) or ! (pending) *
payee free text (optional) Dividend payment
account Type:Name[:ID[:Address]] Liability:InterestAccount:0000-111:Main
arrow -> // >
description quoted string (optional) "Dividend"
amount decimal, commas allowed 1,000.00
commodity uppercase letters (required) GBP
linked + prefix on from-account +Income:Salary
comment # or ; to end of line # note

Linked movements

The + prefix marks movements that share the same source account within a transaction, splitting a single source amount across multiple destinations (e.g. payroll splitting gross salary into net pay and tax).

Usage

npm install
npx tree-sitter generate
npx tree-sitter test

Or with Taskfile:

task check    # generate + test

Editor integration

The grammar includes a queries/highlights.scm for syntax highlighting in editors that support tree-sitter (Neovim, Helix, Zed, etc.).

Documentation

task docs:build   # build HTML docs
tp pages          # local preview
tp pages deploy   # deploy to statichost
Documentation https://h3-tree-sitter-goluca.statichost.page/
Source (Codeberg) https://codeberg.org/hum3/tree-sitter-goluca
Mirror (GitHub) https://github.com/drummonds/tree-sitter-goluca