diff options
author | Luc Sinet <[email protected]> | 2021-08-02 17:19:44 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-02 11:19:44 -0400 |
commit | 6d14d7b5da54fffabfec18b2b09a488d3661d7f9 (patch) | |
tree | e5f0532c0bdd028b597faf3c2bc6d5cd2748a6f3 /lua/core | |
parent | 8e88bf52587c99d1070258f03500cbbdb9b1420c (diff) |
[Refactor] Adopt which key mapping style (#1210)
* Refactor keymappings to match which-key style
* Update confif example + remove redundant way of registering mappings
Diffstat (limited to 'lua/core')
-rw-r--r-- | lua/core/bufferline.lua | 4 | ||||
-rw-r--r-- | lua/core/compe.lua | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lua/core/bufferline.lua b/lua/core/bufferline.lua index 1957226e..35831d03 100644 --- a/lua/core/bufferline.lua +++ b/lua/core/bufferline.lua @@ -2,8 +2,8 @@ lvim.builtin.bufferline = { keymap = { values = { normal_mode = { - { "<S-l>", ":BufferNext<CR>" }, - { "<S-h>", ":BufferPrevious<CR>" }, + ["<S-l>"] = { ":BufferNext<CR>" }, + ["<S-h>"] = { ":BufferPrevious<CR>" }, }, }, opts = { diff --git a/lua/core/compe.lua b/lua/core/compe.lua index e18147fc..5f1632f9 100644 --- a/lua/core/compe.lua +++ b/lua/core/compe.lua @@ -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 = { |