vim-ledger icon indicating copy to clipboard operation
vim-ledger copied to clipboard

Provide CMP completion source (Lua)

Open alerque opened this issue 1 year ago • 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.

alerque avatar Sep 13 '22 12:09 alerque

c.f. cmp-beancount

alerque avatar Sep 13 '22 12:09 alerque

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

kirasok avatar May 19 '23 08:05 kirasok

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.

boydkelly avatar May 19 '23 17:05 boydkelly

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

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

boydkelly avatar May 19 '23 17:05 boydkelly