summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.config/nvim/after/plugin/harpoon.lua6
-rw-r--r--.config/nvim/after/plugin/whichkey.lua8
-rw-r--r--.config/nvim/lua/bindings.lua10
3 files changed, 13 insertions, 11 deletions
diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua
new file mode 100644
index 0000000..3048fc7
--- /dev/null
+++ b/.config/nvim/after/plugin/harpoon.lua
@@ -0,0 +1,6 @@
+local mark = require('harpoon.mark')
+local ui = require('harpoon.ui')
+vim.keymap.set('n', '<M-1>', function() ui.nav_file(1) end)
+vim.keymap.set('n', '<M-2>', function() ui.nav_file(2) end)
+vim.keymap.set('n', '<M-3>', function() ui.nav_file(3) end)
+vim.keymap.set('n', '<M-4>', function() ui.nav_file(4) end)
diff --git a/.config/nvim/after/plugin/whichkey.lua b/.config/nvim/after/plugin/whichkey.lua
index 05f29e9..7b74e73 100644
--- a/.config/nvim/after/plugin/whichkey.lua
+++ b/.config/nvim/after/plugin/whichkey.lua
@@ -1,7 +1,13 @@
-
+local ma = require('harpoon.mark')
+local ui = require('harpoon.ui')
local ts = require('telescope.builtin')
local wk = require('which-key')
wk.register({
+ a = {
+ name = 'harpoon',
+ a = { ma.add_file, 'add file', noremap = true, silent = true },
+ e = { ui.toggle_quick_menu, 'toggle ui', noremap = true, silent = true },
+ },
b = { ':Buffers<CR>', 'buffers', noremap = true, silent = true },
c = { name = '+nerd-commenter' },
d = { ':bd<CR>', 'close buffer', noremap = true, silent = true },
diff --git a/.config/nvim/lua/bindings.lua b/.config/nvim/lua/bindings.lua
index 103ea58..d6ada89 100644
--- a/.config/nvim/lua/bindings.lua
+++ b/.config/nvim/lua/bindings.lua
@@ -11,16 +11,6 @@ vim.keymap.set('n', '<C-q>', '<C-w>q', { noremap = true, silent = false })
vim.keymap.set('n', '*', '*zz', { noremap = true, silent = false })
vim.keymap.set('n', '<C-d>', '<C-d>zz', { noremap = true, silent = false })
vim.keymap.set('n', '<C-u>', '<C-u>zz', { noremap = true, silent = false })
-vim.keymap.set('n', '<M-1>', ':b1<CR>')
-vim.keymap.set('n', '<M-2>', ':b2<CR>')
-vim.keymap.set('n', '<M-3>', ':b3<CR>')
-vim.keymap.set('n', '<M-4>', ':b4<CR>')
-vim.keymap.set('n', '<M-5>', ':b5<CR>')
-vim.keymap.set('n', '<M-6>', ':b6<CR>')
-vim.keymap.set('n', '<M-7>', ':b7<CR>')
-vim.keymap.set('n', '<M-8>', ':b8<CR>')
-vim.keymap.set('n', '<M-9>', ':b9<CR>')
-vim.keymap.set('n', '<M-0>', ':b10<CR>')
vim.keymap.set('i', '<C-j>', 'pumvisible() ? "<C-n>" : "<C-j>"', { expr = true })
vim.keymap.set('i', '<C-k>', 'pumvisible() ? "<C-p>" : "<C-k>"', { expr = true })
vim.keymap.set('i', '<cr>', 'pumvisible() ? asyncomplete#close_popup() : "\\<cr>"', { expr = true })