aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/binds.lua
blob: 4bcebb036a0d0193c7af3a5fc83075a639cd9d73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
local map = vim.keymap.set
-- local color_converter = require "color_converter"

-- redo
map("n", "U", "<C-r>")

map("c", "<CR>", function()
    if vim.fn.pumvisible() == 1 then
        return "<C-y>"
    end
    return "<CR>"
end, { expr = true })

map("n", "H", "5h")
map("n", "J", "5j")
map("n", "K", "5k")
map("n", "L", "5l")

-- disable arrow keys
map("n", "<UP>", "<NOP>")
map("n", "<DOWN>", "<NOP>")
map("n", "<LEFT>", "<NOP>")
map("n", "<RIGHT>", "<NOP>")

map("i", "<UP>", "<NOP>")
map("i", "<DOWN>", "<NOP>")
map("i", "<LEFT>", "<NOP>")
map("i", "<RIGHT>", "<NOP>")

map("n", "<Leader>h", vim.lsp.buf.hover)
map("n", "<Leader>gd", vim.lsp.buf.definition)

map("n", "<C-l>", function()
    vim.fn.setreg("/", "")
end)