Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide CMP completion source (Lua) #134

Open
alerque opened this issue Sep 13, 2022 · 4 comments
Open

Provide CMP completion source (Lua) #134

alerque opened this issue Sep 13, 2022 · 4 comments

Comments

@alerque
Copy link
Member

alerque commented Sep 13, 2022

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
Copy link
Member Author

alerque commented Sep 13, 2022

c.f. cmp-beancount

@kirasok
Copy link

kirasok commented May 19, 2023

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

@boydkelly
Copy link

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
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants