AstroNvim / astrocommunity

A community repository of common plugin specifications
GNU General Public License v3.0
1.04k stars 212 forks source link

feat(completion): add `nvim-cmp-buffer-lines` #1056

Closed Axlefublr closed 1 week ago

Axlefublr commented 1 week ago

πŸ“‘ Description

Adds the nvim-cmp-buffer-lines nvim-cmp source, but instead of just adding it to normal completions, keeps it local to a hotkey.

The reasoning for this is that, even with a low priority, whole line completions end up being super annoying, when mixed in with all the other (usually more useful) suggestions. So it's for this reason that this source is effectively "opt-in".

The mapping used is <C-x><C-l>, because that's the default way to do whole line completions. What you basically get with this community pack, is you replace built in whole line completions with ones that use nvim-cmp.

The hotkey is wack, but it is default! So I think it makes the most sense, even if there could be other, more ergonomic mappings.

At the very least, if a person wants the functionality, but on a different mapping, they now have the option to take a peek at this community pack, copy paste it into their config, and change the mapping to what they want.

β„Ή Additional Information

github-actions[bot] commented 1 week ago

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

Uzaaft commented 1 week ago

Curious as to if you want to keep the note about or not. Besides that, this looks good!

Axlefublr commented 1 week ago

You wanted me to remove it, no?

Uzaaft commented 1 week ago

You wanted me to remove it, no?

I moved it to under the repository link πŸ˜…

Uzaaft commented 1 week ago

Nice. I was wondering why you weren't in the discord anymore. Seeing this PR from you made my day @Axlefublr