Updating harpoon config + migrating to codeium
This commit is contained in:
parent
aa3f06a77f
commit
69e87e7d77
@ -1,13 +1,44 @@
|
||||
local harpoon = require("harpoon")
|
||||
|
||||
-- REQUIRED
|
||||
harpoon:setup()
|
||||
harpoon:setup({})
|
||||
-- REQUIRED
|
||||
--
|
||||
-- basic telescope configuration
|
||||
local conf = require("telescope.config").values
|
||||
local function toggle_telescope(harpoon_files)
|
||||
local file_paths = {}
|
||||
for _, item in ipairs(harpoon_files.items) do
|
||||
table.insert(file_paths, item.value)
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():append() end)
|
||||
vim.keymap.set("n", "<leader>h", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end)
|
||||
require("telescope.pickers").new({}, {
|
||||
prompt_title = "Harpoon",
|
||||
finder = require("telescope.finders").new_table({
|
||||
results = file_paths,
|
||||
}),
|
||||
previewer = conf.file_previewer({}),
|
||||
sorter = conf.generic_sorter({}),
|
||||
}):find()
|
||||
end
|
||||
|
||||
vim.keymap.set("n", "<leader>H", function() toggle_telescope(harpoon:list()) end,
|
||||
{ desc = "Open harpoon in telescope" })
|
||||
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function() harpoon:list():add() end,
|
||||
{ desc = "Harpoon: Add current buffer" })
|
||||
vim.keymap.set("n", "<leader>hh", function() harpoon.ui:toggle_quick_menu(harpoon:list()) end,
|
||||
{ desc = "Harpoon: Toggle quick menu" })
|
||||
|
||||
vim.keymap.set("n", "<C-h>", function() harpoon:list():select(1) end)
|
||||
vim.keymap.set("n", "<C-j>", function() harpoon:list():select(2) end)
|
||||
vim.keymap.set("n", "<C-k>", function() harpoon:list():select(3) end)
|
||||
vim.keymap.set("n", "<C-l>", function() harpoon:list():select(4) end)
|
||||
|
||||
-- Toggle previous & next buffers stored within Harpoon list
|
||||
vim.keymap.set("n", "<leader>hp", function() harpoon:list():prev() end,
|
||||
{ desc = "Harpoon: Previous buffer" })
|
||||
vim.keymap.set("n", "<leader>hn", function() harpoon:list():next() end,
|
||||
{ desc = "Harpoon: Next buffer" })
|
||||
|
||||
|
@ -17,7 +17,8 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
{ "nvim-telescope/telescope.nvim", branch = "0.1.x",
|
||||
{ "nvim-telescope/telescope.nvim",
|
||||
version = "0.1.x",
|
||||
dependencies = { "nvim-lua/plenary.nvim" }
|
||||
},
|
||||
|
||||
@ -35,16 +36,20 @@ return {
|
||||
}
|
||||
},
|
||||
|
||||
{ "stevearc/oil.nvim" },
|
||||
{ "stevearc/oil.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" }
|
||||
},
|
||||
|
||||
{ "kylechui/nvim-surround",
|
||||
version = "*",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup()
|
||||
end
|
||||
},
|
||||
|
||||
{ "numToStr/Comment.nvim",
|
||||
lazy = false,
|
||||
config = function()
|
||||
require("Comment").setup()
|
||||
end
|
||||
@ -91,7 +96,10 @@ return {
|
||||
|
||||
-- lsp
|
||||
|
||||
{ "github/copilot.vim" },
|
||||
{
|
||||
'Exafunction/codeium.vim',
|
||||
event = 'BufEnter'
|
||||
},
|
||||
|
||||
{"williamboman/mason.nvim",
|
||||
lazy = false,
|
||||
|
Loading…
x
Reference in New Issue
Block a user