ledger/vim-ledger

Provide CMP completion source (Lua)

alerque opened this issue · 4 comments

I think it would be useful if, in addition to the native vimscript omnicomplete function currently provided, we provide a Lua source suitable for consumption in other completion frameworks.

In particular I'm interested in nvim-cmp. Providing a Lua module that outputs possible completion would make a much nicer integrated experience rather than my current workaround of having this plugin complete descriptions and accounts and something else providing other completions. In particular not having to re-implement all the bindings so they roughly match would be nice!

I presume this can be done without interrupting VIM users that want to keep using this plugin as-is, but if not I suppose we could launch a new plugin project for the Lua interface.

Hi! I made my cmp-hledger source that works with ledger and hledger

I think it would be useful if, in addition to the native vimscript omnicomplete function currently provided, we provide a Lua source suitable for consumption in other completion frameworks.

In particular I'm interested in nvim-cmp. Providing a Lua module that outputs possible completion would make a much nicer integrated experience rather than my current workaround of having this plugin complete descriptions and accounts and something else providing other completions. In particular not having to re-implement all the bindings so they roughly match would be nice!

Screenshot from 2023-05-19 17-50-32

I presume this can be done without interrupting VIM users that want to keep using this plugin as-is, but if not I suppose we could launch a new plugin project for the Lua interface.

I'd vote for a new plugin that brings in the completion from cmp-(h)ledger, and highlighting from treesitter (which is quite awesome now with a highlight group for negative numbers.... Maybe a new plugin would be lean and more about workflow and shortcuts.

Hi! I made my cmp-hledger source that works with ledger and hledger

Awesome! So glad I came here to discover that!!!!