This commit is contained in:
Yaser Alraddadi 2025-02-16 21:57:58 +03:00
parent bdd33a7d9a
commit 451549cb45
No known key found for this signature in database
GPG Key ID: 808212144E6DBE90
3 changed files with 52 additions and 4 deletions

View File

@ -235,14 +235,17 @@ vim.keymap.set('n', '<down>', '<cmd>echo "Use j to move!!"<CR>')
-- vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
-- Buffer switch
-- https://github.com/tpope/vim-unimpaired
vim.keymap.set({ 'n' }, ']b', '<cmd>bnext<CR>', { silent = true })
vim.keymap.set({ 'n' }, '[b', '<cmd>bprev<CR>', { silent = true })
vim.keymap.set({ 'n' }, ']q', '<cmd>cnext<CR>', { silent = true })
vim.keymap.set({ 'n' }, '[q', '<cmd>cprevious<CR>', { silent = true })
-- vim.keymap.set({ 'n', 'i', 'v' }, '<C-h>', '<cmd>bnext<CR>', { silent = true })
-- vim.keymap.set({ 'n', 'i', 'v' }, '<C-l>', '<cmd>bprev<CR>', { silent = true })
-- Close all buffers and keep the open one only
vim.keymap.set('n', '<leader>b', '<cmd>:%bd|e#|bd#<CR>', { desc = 'Close all buffers and keep the open one only' })
-- signature help
-- Signature help
vim.lsp.handlers['textDocument/signatureHelp'] = vim.lsp.with(vim.lsp.handlers['signature_help'], {
border = 'single',
close_events = { 'CursorMoved', 'BufHidden' },

View File

@ -0,0 +1,45 @@
return {
{
'ThePrimeagen/harpoon',
branch = 'harpoon2',
dependencies = { 'nvim-lua/plenary.nvim' },
init = function()
local harpoon = require 'harpoon'
vim.keymap.set('n', '<leader>hh', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end)
vim.keymap.set('n', '<leader>ha', function()
harpoon:list():add()
end)
vim.keymap.set('n', '<C-1>', function()
harpoon:list():select(1)
end)
vim.keymap.set('n', '<C-2>', function()
harpoon:list():select(2)
end)
vim.keymap.set('n', '<C-3>', function()
harpoon:list():select(3)
end)
vim.keymap.set('n', '<C-4>', function()
harpoon:list():select(4)
end)
-- Toggle previous & next buffers stored within Harpoon list
vim.keymap.set('n', '[h', function()
harpoon:list():prev()
end)
vim.keymap.set('n', ']h', function()
harpoon:list():next()
end)
end,
config = function()
require('harpoon'):setup {
settings = {
sync_on_ui_close = true,
save_on_toggle = true,
},
}
end,
},
}

View File

@ -3,7 +3,7 @@ return {
-- "kevinhwang91/nvim-bqf",
-- lazy = false,
-- },
{
'tpope/vim-unimpaired',
},
-- {
-- 'tpope/vim-unimpaired',
-- },
}