Enable default plugins, add toggleterm, harpoon and lazygit
This commit is contained in:
0
lua/custom/options.lua
Normal file
0
lua/custom/options.lua
Normal file
50
lua/custom/plugins/harpoon.lua
Normal file
50
lua/custom/plugins/harpoon.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
return {
|
||||
'ThePrimeagen/harpoon',
|
||||
branch = 'harpoon2',
|
||||
requires = { { 'nvim-lua/plenary.nvim' } },
|
||||
config = function()
|
||||
local harpoon = require 'harpoon'
|
||||
harpoon:setup()
|
||||
-- Harpoon remaps
|
||||
vim.keymap.set('n', '<leader>bm', function()
|
||||
harpoon:list():append()
|
||||
end, { desc = 'Add buffer to Harpoon list' })
|
||||
vim.keymap.set('n', '<C-e>', function()
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end)
|
||||
|
||||
vim.keymap.set('n', '<C-h>', function()
|
||||
harpoon:list():select(1)
|
||||
end)
|
||||
vim.keymap.set('n', '<C-t>', function()
|
||||
harpoon:list():select(2)
|
||||
end)
|
||||
vim.keymap.set('n', '<C-s>', function()
|
||||
harpoon:list():select(3)
|
||||
end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set('n', '<C-S-P>', function()
|
||||
harpoon:list():prev()
|
||||
end)
|
||||
vim.keymap.set('n', '<C-S-N>', function()
|
||||
harpoon:list():next()
|
||||
end)
|
||||
|
||||
harpoon:extend {
|
||||
UI_CREATE = function(cx)
|
||||
vim.keymap.set('n', '<C-v>', function()
|
||||
harpoon.ui:select_menu_item { vsplit = true }
|
||||
end, { buffer = cx.bufnr })
|
||||
|
||||
vim.keymap.set('n', '<C-x>', function()
|
||||
harpoon.ui:select_menu_item { split = true }
|
||||
end, { buffer = cx.bufnr })
|
||||
|
||||
vim.keymap.set('n', '<C-t>', function()
|
||||
harpoon.ui:select_menu_item { tabedit = true }
|
||||
end, { buffer = cx.bufnr })
|
||||
end,
|
||||
}
|
||||
end,
|
||||
}
|
||||
7
lua/custom/plugins/lazygit.lua
Normal file
7
lua/custom/plugins/lazygit.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
'kdheepak/lazygit.nvim',
|
||||
-- optional for floating window border decoration
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
}
|
||||
27
lua/custom/plugins/toggleterm.lua
Normal file
27
lua/custom/plugins/toggleterm.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
return {
|
||||
{
|
||||
'akinsho/toggleterm.nvim',
|
||||
-- [[ cmd = { "toggleterm", "termexec" }, ]]
|
||||
opts = {
|
||||
highlights = {
|
||||
normal = { link = 'normal' },
|
||||
normalnc = { link = 'normalnc' },
|
||||
normalfloat = { link = 'normalfloat' },
|
||||
floatborder = { link = 'floatborder' },
|
||||
statusline = { link = 'statusline' },
|
||||
statuslinenc = { link = 'statuslinenc' },
|
||||
winbar = { link = 'winbar' },
|
||||
winbarnc = { link = 'winbarnc' },
|
||||
},
|
||||
size = 10,
|
||||
on_create = function()
|
||||
vim.opt.foldcolumn = '0'
|
||||
vim.opt.signcolumn = 'no'
|
||||
end,
|
||||
open_mapping = [[<f12>]],
|
||||
shading_factor = 2,
|
||||
direction = 'float',
|
||||
float_opts = { border = 'rounded' },
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user