nvim/lua/plugins/navigation.lua

64 lines
2.0 KiB
Lua
Raw Permalink 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({
2024-10-16 15:56:59 +02:00
{ "<leader>g", group = "git" },
{ "<leader>gh", telescope.git_bcommits, { noremap = true, silent = true }, desc = "View commits of current buffer" },
{ "<leader>gb", telescope.git_branches, { noremap = true, silent = true }, desc = "View git branches" },
{ "<leader>gs", telescope.git_status, { noremap = true, silent = true }, desc = "View git status" },
{ "<leader>f", group = "find" },
{ '<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 = {
enable_preview = true,
}
},
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' }
-- }
}