Ledger extension for Visual Studio Code

Sun, Dec 4, 2016 2-minute read

I recently came across plain text accounting and I started using ledger for my personal finance tracking.

I think this is a great approach that balances extreme simplicity on the file format, it’s a plain text file with entries looking like the following, and a powerful application to create all sort of reports and even to manage budgeting.

2016/11/29 ! Supermarket
	Expenses:Groceries	£30
	Assets:Current:MyBank

The plain text format also means that everyone can add new entries with their favourite editors. I’m currently using Visual Studio Code but it was lacking ledger language support. I took the chance to get two birds with one stone and I decided to write it myself. This way I can learn how to extend Visual Studio Code and I’ll also have a very useful extension as the result.

The extension is now available in the marketplace and it’s code is on GitHub. The features it adds over basic text editing are what you would expect from a language with first class support:

  • syntax highlighing
  • validation of the ledger files
  • autocompletion

Everything is still in a very early stage, but it’s serving my needs well and I think it’s a good starting point. If you’re into plain-text accounting and you like Visual Studio Code you should give it a try and maybe give me some feedback, feature requests or even contribute a pull request.