Skip to content

Commit

Permalink
that was easier than expected
Browse files Browse the repository at this point in the history
  • Loading branch information
alexscjundev committed May 13, 2024
1 parent 6713051 commit 70ef68d
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 12 deletions.
26 changes: 23 additions & 3 deletions lua/custom/plugins/buffer-manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ return {
-- * managing open files without mental overhead
-- * bn, bp
-- * storing open buffer list to a file (haven't found this useful yet)
--
-- This has now become my full harpoon interface
-- - teleport to harpooned location
-- manage buffer list (add, delete, reorder)
-- In the future, use this to help compose argument list
--
-- Also note - the number by each line indicates nesting
'j-morano/buffer_manager.nvim',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
Expand Down Expand Up @@ -40,7 +47,20 @@ return {
end, opts)
end
-- Just the menu
map({ 't', 'n' }, '<M-b>', bmui.toggle_quick_menu, opts)
map({ 't', 'n' }, '<M-m>', bmui.toggle_quick_menu, opts)
-- Give homerow harpoon access
map('n', '<M-j>', function()
bmui.nav_file(1)
end, opts)
map('n', '<M-k>', function()
bmui.nav_file(2)
end, opts)
map('n', '<M-l>', function()
bmui.nav_file(3)
end, opts)
map('n', '<M-;>', function()
bmui.nav_file(4)
end, opts)
-- Open menu and search
-- map({ 't', 'n' }, '<M-c>', function()
-- bmui.toggle_quick_menu()
Expand All @@ -50,8 +70,8 @@ return {
-- end, 50)
-- end, opts)
-- Next/Prev
-- map('n', '<M-j>', bmui.nav_next, opts)
-- map('n', '<M-k>', bmui.nav_prev, opts)
map('n', '<M-n>', bmui.nav_next, opts)
map('n', '<M-p>', bmui.nav_prev, opts)
end,
},
}
20 changes: 11 additions & 9 deletions lua/custom/plugins/grapple.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
-- },
-- }

-- 5.12.24 we are phasing out grapple
-- its only utility is to pin files to specific scopes
-- let's try out grapple
-- note the following are equivalent
-- :Grapple cycle_tags next scope=cwd
Expand All @@ -23,25 +25,25 @@ return {
},
-- use my own keys
keys = {
{ '<M-m>', '<cmd>Grapple toggle_tags<cr>', desc = 'Toggle tags menu' },
-- { '<M-m>', '<cmd>Grapple toggle_tags<cr>', desc = 'Toggle tags menu' },

{ '<M-s>', '<cmd>Grapple toggle<cr>', desc = 'Toggle tag' },
{ '<M-n>', '<cmd>Grapple cycle_tags next<cr>', desc = 'Go to next tag' },
{ '<M-p>', '<cmd>Grapple cycle_tags prev<cr>', desc = 'Go to previous tag' },
-- { '<M-s>', '<cmd>Grapple toggle<cr>', desc = 'Toggle tag' },
-- { '<M-n>', '<cmd>Grapple cycle_tags next<cr>', desc = 'Go to next tag' },
-- { '<M-p>', '<cmd>Grapple cycle_tags prev<cr>', desc = 'Go to previous tag' },

-- { '<M-h>', '<cmd>Grapple select index=1<cr>', desc = 'Select first tag' },
-- { '<M-j>', '<cmd>Grapple select index=2<cr>', desc = 'Select second tag' },
-- { '<M-k>', '<cmd>Grapple select index=3<cr>', desc = 'Select third tag' },
-- { '<M-l>', '<cmd>Grapple select index=4<cr>', desc = 'Select fourth tag' },
-- { '<M-;>', '<cmd>Grapple select index=5<cr>', desc = 'Select fifth tag' },
--
{ '<M-j>', '<cmd>Grapple select index=1<cr>', desc = 'Select first tag' },
{ '<M-k>', '<cmd>Grapple select index=2<cr>', desc = 'Select second tag' },
{ '<M-l>', '<cmd>Grapple select index=3<cr>', desc = 'Select third tag' },
{ '<M-;>', '<cmd>Grapple select index=4<cr>', desc = 'Select fourth tag' },
-- { '<M-j>', '<cmd>Grapple select index=1<cr>', desc = 'Select first tag' },
-- { '<M-k>', '<cmd>Grapple select index=2<cr>', desc = 'Select second tag' },
-- { '<M-l>', '<cmd>Grapple select index=3<cr>', desc = 'Select third tag' },
-- { '<M-;>', '<cmd>Grapple select index=4<cr>', desc = 'Select fourth tag' },

-- sixth tag does not work
{ "<M-'>", '<cmd>Grapple select index=6<cr>', desc = 'Select sixth tag' },
-- { "<M-'>", '<cmd>Grapple select index=6<cr>', desc = 'Select sixth tag' },
},
}

Expand Down

0 comments on commit 70ef68d

Please sign in to comment.