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

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

Merged
merged 4 commits into from
Jun 20, 2024

Conversation

Axlefublr
Copy link
Contributor

📑 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

Copy link

github-actions bot commented Jun 20, 2024

Review Checklist

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

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Proper usage of opts table rather than setting things up with the config function.

@Uzaaft
Copy link
Member

Uzaaft commented Jun 20, 2024

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

@Axlefublr
Copy link
Contributor Author

You wanted me to remove it, no?

@Uzaaft
Copy link
Member

Uzaaft commented Jun 20, 2024

You wanted me to remove it, no?

I moved it to under the repository link 😅

@Uzaaft
Copy link
Member

Uzaaft commented Jun 20, 2024

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

@Uzaaft Uzaaft merged commit 07ddd3d into AstroNvim:main Jun 20, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants