Skip to content

loonies/ncm2-ledger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ncm2 Ledger
===========

Description
-----------

Ncm2 completion source for Ledger CLI (http://ledger-cli.org) based
tools.


Installation
------------

Requirements:

 - NeoVim
 - Plugin Ncm2 (https://github.com/ncm2/ncm2)
 - Ledger based tool (ledger, hledger, etc.)

Installing:

Consult NeoVim documentation on installing packages.
Type `:help packages` in NeoVim for help.


Documentation
-------------

The Ledger Ncm2 source will provide completion for accounts from a
Ledger journal file.

There are four completion types provided by Ncm2 Ledger: `accounts`,
`tags`, `payees`, and `commodities` as well as relevant setting options
to influence retrieving completion candidates.

By default, `ledger` command with corresponding arguments is used.
Redefine the command as an array of CLI arguments.
For example, if you are using `hledger`:

    let g:ncm2_ledger_cmd_accounts = ['hledger', 'accounts']

Settings

    g:ncm2_ledger_opt_file
        Defines a file option name. Edited file is passed to this
        option as an argument.
        Type: String
        Default: --file

    g:ncm2_ledger_cmd_accounts
        Defines a command for retrieving accounts
        Type: List
        Default: ['ledger', 'accounts']

    g:ncm2_ledger_cmd_tags
        Defines a command for retrieving tags
        Type: List
        Default: ['ledger', 'tags']

    g:ncm2_ledger_cmd_payees
        Defines a command for retrieving payees
        Type: List
        Default: ['ledger', 'payees']

    g:ncm2_ledger_cmd_commodities
        Defines a command for retrieving commodities
        Type: List
        Default: ['ledger', 'commodities']

Note that in case of journal file parsing errors (e.g. unbalanced
transaction), previously cached candidates are returned, if any.


Contributing
------------

Open an issue or send a pull request on the Github
(http://github.com/loonies/ncm2-ledger).


Authors
-------

Maintainer:

 - Miodrag Tokić


Copyright
---------

Copyright (C) 2020 Miodrag Tokić.

Released under the MIT License. See the LICENSE file for details.

About

Ncm2 source for Ledger based tools

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published