summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/keymappings.lua
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-06 21:53:56 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2021-09-06 21:53:56 +0200
commit6a1732982287ef5aff2a6de171192b9e2bb90758 (patch)
tree543f94f80d548b9ed7a9d0daecb08575a01a9a45 /.config/nvim/lua/keymappings.lua
parentb89e893bfc7b8893dc4c13aa55f627096b32758a (diff)
Updates to nvim from lvim
Diffstat (limited to '.config/nvim/lua/keymappings.lua')
-rw-r--r--.config/nvim/lua/keymappings.lua24
1 files changed, 17 insertions, 7 deletions
diff --git a/.config/nvim/lua/keymappings.lua b/.config/nvim/lua/keymappings.lua
index f7d91d8..cc6865a 100644
--- a/.config/nvim/lua/keymappings.lua
+++ b/.config/nvim/lua/keymappings.lua
@@ -83,8 +83,14 @@ function M.config()
["<A-Right>"] = "<C-\\><C-N><C-w>l",
-- navigate tab completion with <c-j> and <c-k>
-- runs conditionally
- ["<C-j>"] = { 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true } },
- ["<C-k>"] = { 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true } },
+ ["<C-j>"] = {
+ 'pumvisible() ? "\\<C-n>" : "\\<C-j>"',
+ { expr = true, noremap = true },
+ },
+ ["<C-k>"] = {
+ 'pumvisible() ? "\\<C-p>" : "\\<C-k>"',
+ { expr = true, noremap = true },
+ },
},
---@usage change or add keymappings for normal mode
@@ -149,8 +155,14 @@ function M.config()
command_mode = {
-- navigate tab completion with <c-j> and <c-k>
-- runs conditionally
- ["<C-j>"] = { 'pumvisible() ? "\\<C-n>" : "\\<C-j>"', { expr = true, noremap = true } },
- ["<C-k>"] = { 'pumvisible() ? "\\<C-p>" : "\\<C-k>"', { expr = true, noremap = true } },
+ ["<C-j>"] = {
+ 'pumvisible() ? "\\<C-n>" : "\\<C-j>"',
+ { expr = true, noremap = true },
+ },
+ ["<C-k>"] = {
+ 'pumvisible() ? "\\<C-p>" : "\\<C-k>"',
+ { expr = true, noremap = true },
+ },
},
}
@@ -159,9 +171,7 @@ function M.config()
options.keys.normal_mode["<A-Down>"] = options.keys.normal_mode["<C-Down>"]
options.keys.normal_mode["<A-Left>"] = options.keys.normal_mode["<C-Left>"]
options.keys.normal_mode["<A-Right>"] = options.keys.normal_mode["<C-Right>"]
- if Log:get_default() then
- Log:get_default().info "Activated mac keymappings"
- end
+ Log:debug "Activated mac keymappings"
end
end