Skip to content

farhaven/beancount-lsp

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Beancount LSP

This is an implementation of the LSP protocol for beancount files.

At the moment, the server only supports completion of account names. Pretty printing of beancount files and other similar things are not supported.

I have tested this server with a moderately large beancount file (roughly 60 transactions/month for 5 years) using acme-lsp and the ACME text editor.

Requirements

  • Python 3

Setup

Create a Python virtualenv and install beancount-lsps dependencies:

python3 -m venv venv
. venv/bin/activate
pip3 install -r requirements.txt

Configuration for acme-lsp

I use the following configuration for acme-lsp:

ProxyNetwork = "unix"
ProxyAddress = "/tmp/ns.farhaven.:0/acme-lsp.rpc"
AcmeNetwork = "unix"
AcmeAddress = "/tmp/ns.farhaven.:0/acme"
RootDirectory = "/"
FormatOnPut = true
CodeActionsOnPut = ["source.organizeImports"]

[Servers]
	[Servers.beancount]
	Command = ["/path/to/repo/venv/bin/python", "/path/to/repo/langserver.py"]

[[FilenameHandlers]]
Pattern = '\.beancount$'
ServerKey = "beancount"

You will need to adjust the paths for the beancount langserver.

About

An LSP server for beancount accounting files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages