Ledger language support in Atom
Adds syntax highlighting, autocompletion and parser error reports to Ledger files in Atom.
Grammar definition inspired by the Ledger TextMate bundle.
Contributions are greatly appreciated. Please fork this repository and open a pull request to add snippets, make grammar tweaks, etc.
Autocompletion
Autocompletion uses the autocomplete-plus
package, that is bundled in Atom. In the autocomplete-plus
settings pane
Default Provider should be set to Symbol
. The Minimum Word Length setting
indicates when autocompletion is about to be triggered.
Parser error reports
In case it is not accessible from PATH, the Ledger binary should be set in the
ledger-language
package settings pane. It will be used to silently check the
journal file anytime it is saved. If there are parser errors, a notification is
shown.
Transaction highlighting
Uncleared and pending transactions are highlighted by default. To customize the
highlighting, call the Application: Open Your Stylesheet command to
open styles.less
and define the new highlighting styles there.
For example, add this snippet to disable highlighting of uncleared transactions:
atom-text-editor::shadow .ledger-transaction-uncleared .region {
background-color: transparent;
}