[Refactor] Adopt which key mapping style (#1210)

* Refactor keymappings to match which-key style

* Update confif example + remove redundant way of registering mappings
This commit is contained in:
Luc Sinet 2021-08-02 17:19:44 +02:00 committed by GitHub
parent 8e88bf5258
commit 6d14d7b5da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 70 additions and 84 deletions

View file

@ -42,12 +42,12 @@ M.config = function()
keymap = {
values = {
insert_mode = {
{ "<Tab>", 'pumvisible() ? "<C-n>" : "<Tab>"' },
{ "<S-Tab>", 'pumvisible() ? "<C-p>" : "<S-Tab>"' },
{ "<C-Space>", "compe#complete()" },
{ "<C-e>", "compe#close('<C-e>')" },
{ "<C-f>", "compe#scroll({ 'delta': +4 })" },
{ "<C-d>", "compe#scroll({ 'delta': -4 })" },
["<Tab>"] = { 'pumvisible() ? "<C-n>" : "<Tab>"' },
["<S-Tab>"] = { 'pumvisible() ? "<C-p>" : "<S-Tab>"' },
["<C-Space>"] = { "compe#complete()" },
["<C-e>"] = { "compe#close('<C-e>')" },
["<C-f>"] = { "compe#scroll({ 'delta': +4 })" },
["<C-d>"] = { "compe#scroll({ 'delta': -4 })" },
},
},
opts = {