summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/plugin
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2023-12-20 11:15:07 +0100
committerJoe <rbo@gmx.us>2023-12-20 11:15:07 +0100
commit9f84de74161d66619de6c70b9d3c2ae6dc01abaf (patch)
treeafe0fcc6de0c04d01d9e3c09f9d3b2633cbcc637 /.config/nvim/after/plugin
parentup (diff)
downloaddotfiles-bsd-9f84de74161d66619de6c70b9d3c2ae6dc01abaf.tar.gz
dotfiles-bsd-9f84de74161d66619de6c70b9d3c2ae6dc01abaf.tar.bz2
dotfiles-bsd-9f84de74161d66619de6c70b9d3c2ae6dc01abaf.tar.xz
dotfiles-bsd-9f84de74161d66619de6c70b9d3c2ae6dc01abaf.tar.zst
dotfiles-bsd-9f84de74161d66619de6c70b9d3c2ae6dc01abaf.zip
up
Diffstat (limited to '.config/nvim/after/plugin')
-rw-r--r--.config/nvim/after/plugin/harpoon.lua6
-rw-r--r--.config/nvim/after/plugin/whichkey.lua18
2 files changed, 12 insertions, 12 deletions
diff --git a/.config/nvim/after/plugin/harpoon.lua b/.config/nvim/after/plugin/harpoon.lua
deleted file mode 100644
index 3048fc7..0000000
--- a/.config/nvim/after/plugin/harpoon.lua
+++ /dev/null
@@ -1,6 +0,0 @@
-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 35f8078..6c32396 100644
--- a/.config/nvim/after/plugin/whichkey.lua
+++ b/.config/nvim/after/plugin/whichkey.lua
@@ -1,19 +1,25 @@
-local ma = require('harpoon.mark')
-local ui = require('harpoon.ui')
+local harpoon = require('harpoon')
+harpoon:setup()
+
+vim.keymap.set('n', '<M-1>', function() harpoon:list():select(1) end)
+vim.keymap.set('n', '<M-2>', function() harpoon:list():select(2) end)
+vim.keymap.set('n', '<M-3>', function() harpoon:list():select(3) end)
+vim.keymap.set('n', '<M-4>', function() harpoon:list():select(4) end)
+
local ts = require('telescope.builtin')
require('telescope').load_extension('harpoon')
local wk = require('which-key')
wk.register({
a = {
name = 'harpoon',
- a = { ma.add_file, 'add file', noremap = true, silent = true },
- e = { ':Telescope harpoon marks<CR>', 'harpoon marks', noremap = true, silent = true },
- f = { ':Telescope harpoon marks<CR>', 'harpoon marks', noremap = true, silent = true },
+ a = { function() harpoon:list():append() end, 'add file', noremap = true, silent = true },
+ e = { function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, 'harpoon ui', noremap = true, silent = true },
+ f = { ':Telescope harpoon marks<CR>', 'harpoon telescope 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 },
- D = { 'ddk:put = strftime(\' * %c\')<CR>', 'insert date', noremap = true, silent = true },
+ D = { '"-ddk:put = strftime(\' * %c\')<CR>', 'insert date', noremap = true, silent = true },
e = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true },
G = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true },
h = { ':Startify<CR>', 'startify', noremap = true, silent = true },