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: allow merging of keymap preset with custom keymap #233

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

kedom1337
Copy link
Contributor

This PR adds the ability to merge a custom keymap with one of the keymap presets.
This is achieved by

  1. Extending the keymap configuration with a preset key which specifies which preset to use
  2. Using vim.tbl_extend to then merge the preset with the custom keymap

Example:

keymap = {
  preset = 'default',
  ["<cr>"] = { "select_and_accept", "fallback" },
},

Copy link
Owner

@Saghen Saghen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks! Some conflicts on the readme since I just added an enter preset

lua/blink/cmp/keymap.lua Outdated Show resolved Hide resolved
@Saghen Saghen merged commit 6b46164 into Saghen:main Nov 1, 2024
@Saghen
Copy link
Owner

Saghen commented Nov 1, 2024

Thanks again!

@kedom1337
Copy link
Contributor Author

I should thank you :). Thanks for the awesome plugin!

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