nvim/lua/plugins/navigation.lua

62 lines
2.0 KiB
Lua
Raw Normal View History

return {
{
'nvim-telescope/telescope.nvim',
2024-01-04 20:45:30 +01:00
version = '0.1.*',
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local telescope = require("telescope.builtin")
local wk = require("which-key")
wk.add({
{ "<leader>gh", telescope.git_bcommits, { noremap = true, silent = true, group = "git", desc = "View commits of current buffer" } },
{ "<leader>gb", telescope.git_branches, { noremap = true, silent = true, group = "git", desc = "View git branches" } },
{ "<leader>gs", telescope.git_status, { noremap = true, silent = true, group = "git", desc = "View git status" } },
{ '<Leader>ff', telescope.git_files, { noremap = true, silent = true, desc = "Search files" } },
{ '<Leader>fg', telescope.live_grep, { noremap = true, silent = true, desc = "Search in files" } },
{ '<Leader>fb', telescope.buffers, { noremap = true, silent = true, desc = "Search in buffers" } },
{ '<Leader>fh', telescope.help_tags, { noremap = true, silent = true, desc = "Search in help" } },
{ '<Leader>fk', telescope.keymaps, { noremap = true, silent = true, desc = "Search in keymaps" } },
{ '<leader>cc', telescope.colorscheme, { desc = "Select colorscheme" } },
})
end
},
{
'nvim-telescope/telescope-ui-select.nvim',
dependencies = { 'nvim-telescope/telescope.nvim' },
config = function()
require("telescope").setup {
defaults = {
mappings = {
i = {
["<C-h>"] = "which_key"
}
}
},
pickers = {
colorscheme = {
theme = "dropdown"
}
},
extensions = {
["ui-select"] = {
require("telescope.themes").get_cursor()
}
}
}
require("telescope").load_extension("ui-select")
end
}
-- Don't really need it. Nicer than the default but that's it
-- {
-- 'nvim-tree/nvim-tree.lua',
-- config = function()
-- require('nvim-tree').setup {
-- view = {
-- width = 30,
-- side = 'left',
-- },
-- }
-- end,
-- dependencies = { 'nvim-tree/nvim-web-devicons' }
-- }
}