feat: add harpoon
This commit is contained in:
parent
baf65c6ddb
commit
9fa4cae11b
|
@ -0,0 +1,24 @@
|
||||||
|
return {
|
||||||
|
{
|
||||||
|
'ThePrimeagen/harpoon',
|
||||||
|
dependencies = {
|
||||||
|
'nvim-lua/plenary.nvim',
|
||||||
|
},
|
||||||
|
config = function()
|
||||||
|
local term = require 'harpoon.term'
|
||||||
|
local mark = require 'harpoon.mark'
|
||||||
|
local ui = require 'harpoon.ui'
|
||||||
|
|
||||||
|
-- add file
|
||||||
|
vim.keymap.set('n', '<leader>ha', mark.add_file, { desc = '[H]arpoon [a]dd file' })
|
||||||
|
|
||||||
|
-- open menu
|
||||||
|
vim.keymap.set('n', '<leader>he', ui.toggle_quick_menu, { desc = '[H]arpoon toggle m[e]nu' })
|
||||||
|
|
||||||
|
-- open terminal
|
||||||
|
vim.keymap.set('n', '<leader>ht', function()
|
||||||
|
term.gotoTerminal(0)
|
||||||
|
end, { desc = '[H]arpoon [t]erminal' })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
|
@ -39,6 +39,9 @@ return {
|
||||||
-- Enable telescope fzf native, if installed
|
-- Enable telescope fzf native, if installed
|
||||||
pcall(require('telescope').load_extension, 'fzf')
|
pcall(require('telescope').load_extension, 'fzf')
|
||||||
|
|
||||||
|
-- Enable harpoon
|
||||||
|
require('telescope').load_extension 'harpoon'
|
||||||
|
|
||||||
-- See `:help telescope.builtin`
|
-- See `:help telescope.builtin`
|
||||||
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
vim.keymap.set('n', '<leader>?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' })
|
||||||
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
vim.keymap.set('n', '<leader><space>', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' })
|
||||||
|
@ -62,8 +65,9 @@ return {
|
||||||
end, { desc = '[S]earch [C]olorscheme' })
|
end, { desc = '[S]earch [C]olorscheme' })
|
||||||
|
|
||||||
-- extensions
|
-- extensions
|
||||||
-- vim.keymap.set('n', '<leader>fb', require('telescope').extensions.file_browser.file_browser, { desc = '[F]ile [B]rowser' })
|
vim.api.nvim_set_keymap('n', '<leader>tc', ':TodoTelescope<CR>', { desc = '[T]odo [c]omments', noremap = true })
|
||||||
vim.api.nvim_set_keymap('n', '<leader>tc', ':TodoTelescope<CR>', { desc = '[T]odo [C]omments', noremap = true })
|
vim.api.nvim_set_keymap('n', '<leader>hm', ':Telescope harpoon marks<CR>',
|
||||||
|
{ desc = '[H]arpoon [m]arks', noremap = true })
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue