Change harpoon for graple in nvim
This commit is contained in:
parent
cc3b1be7a6
commit
4f4d322554
4 changed files with 23 additions and 59 deletions
20
chezmoi/dot_config/nvim/lua/aleidk/plugins/bookmarks.lua
Normal file
20
chezmoi/dot_config/nvim/lua/aleidk/plugins/bookmarks.lua
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
return {
|
||||
"cbochs/grapple.nvim",
|
||||
dependencies = {
|
||||
{ "nvim-tree/nvim-web-devicons", lazy = true },
|
||||
},
|
||||
enabled = false,
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
cmd = "Grapple",
|
||||
keys = {
|
||||
{ "<leader><leader>a", "<cmd>Grapple toggle<cr>", desc = "Toggle bookmark for current file" },
|
||||
{ "<leader><leader>t", "<cmd>Grapple toggle_tags<cr>", desc = "Toggle bookmarks window" },
|
||||
{ "<leader><leader>T", "<cmd>Grapple toggle_scopes<cr>", desc = "Toggle scopes window" },
|
||||
{ "<leader><leader>n", "<cmd>Grapple cycle forward<cr>", desc = "Next bookmark" },
|
||||
{ "<leader><leader>N", "<cmd>Grapple cycle backward<cr>", desc = "Prev bookmark" },
|
||||
{ "<leader><leader>j", "<cmd>Grapple select index=1<cr>", desc = "bookmark 1" },
|
||||
{ "<leader><leader>k", "<cmd>Grapple select index=2<cr>", desc = "bookmark 2" },
|
||||
{ "<leader><leader>l", "<cmd>Grapple select index=3<cr>", desc = "bookmark 3" },
|
||||
{ "<leader><leader>ñ", "<cmd>Grapple select index=4<cr>", desc = "bookmark 4" },
|
||||
},
|
||||
}
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
-- lazy = false,
|
||||
opts = {
|
||||
global_settings = {
|
||||
-- sets the marks upon calling `toggle` on the ui, instead of require `:w`.
|
||||
save_on_toggle = true,
|
||||
-- saves the harpoon file upon every change. disabling is unrecommended.
|
||||
save_on_change = true,
|
||||
-- sets harpoon to run the command immediately as it's passed to the terminal when calling `sendCommand`.
|
||||
enter_on_sendcmd = true,
|
||||
-- closes any tmux windows harpoon that harpoon creates when you close Neovim.
|
||||
tmux_autoclose_windows = false,
|
||||
-- filetypes that you want to prevent from adding to the harpoon list menu.
|
||||
excluded_filetypes = { "harpoon" },
|
||||
-- set marks specific to each git branch inside git repository
|
||||
mark_branch = false,
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("harpoon").setup(opts)
|
||||
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
local telescope = require("telescope")
|
||||
|
||||
telescope.load_extension("harpoon")
|
||||
|
||||
local function map(key, func, desc)
|
||||
vim.keymap.set("n", "<leader><leader>" .. key, func, { desc = desc })
|
||||
end
|
||||
|
||||
map("n", mark.add_file, "Add mark")
|
||||
|
||||
map("t", ui.toggle_quick_menu, "Toogle UI")
|
||||
|
||||
map("j", function()
|
||||
ui.nav_file(1)
|
||||
end, "Navigate to file 1")
|
||||
|
||||
map("k", function()
|
||||
ui.nav_file(2)
|
||||
end, "Navigate to file 2")
|
||||
|
||||
map("l", function()
|
||||
ui.nav_file(3)
|
||||
end, "Navigate to file 3")
|
||||
|
||||
map("ñ", function()
|
||||
ui.nav_file(4)
|
||||
end, "Navigate to file 4")
|
||||
|
||||
map("T", "<CMD>Telescope harpoon marks<CR>", "Open marks in telescope")
|
||||
end,
|
||||
}
|
||||
|
|
@ -46,7 +46,9 @@ return {
|
|||
miniclue.gen_clues.windows(),
|
||||
miniclue.gen_clues.z(),
|
||||
|
||||
{ mode = "n", keys = "<Leader><Leader>", desc = "+Harpoon" },
|
||||
{ mode = "n", keys = "<Leader><Leader>", desc = "+Bookmarks" },
|
||||
{ mode = "n", keys = "<Leader><Leader>n", postkeys = "<Leader><Leader>" },
|
||||
{ mode = "n", keys = "<Leader><Leader>N", postkeys = "<Leader><Leader>" },
|
||||
{ mode = "n", keys = "<Leader>b", desc = "+Buffers" },
|
||||
{ mode = "n", keys = "<Leader>bh", postkeys = "<Leader>b" },
|
||||
{ mode = "n", keys = "<Leader>bl", postkeys = "<Leader>b" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue