69 lines
2.1 KiB
Lua
Executable File
69 lines
2.1 KiB
Lua
Executable File
return {
|
|
-- fuzzy finder
|
|
"nvim-telescope/telescope.nvim",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
},
|
|
config = function()
|
|
local builtin = require("telescope.builtin")
|
|
local actions = require("telescope.actions")
|
|
local opts = { silent = true }
|
|
|
|
require("telescope").setup({
|
|
defaults = {
|
|
mappings = {
|
|
i = {
|
|
["<C-j>"] = actions.move_selection_next,
|
|
["<C-k>"] = actions.move_selection_previous,
|
|
["<C-q>"] = actions.send_selected_to_qflist + actions.open_qflist, -- TODO investigate
|
|
},
|
|
},
|
|
},
|
|
})
|
|
|
|
opts.desc = "telescope find files"
|
|
vim.keymap.set("n", "<leader>ff", builtin.find_files, opts)
|
|
|
|
opts.desc = "telescope live grep"
|
|
vim.keymap.set("n", "<leader>fg", builtin.live_grep, opts)
|
|
|
|
opts.desc = "telescope buffers"
|
|
vim.keymap.set("n", "<leader>fb", builtin.buffers, opts)
|
|
|
|
opts.desc = "Show nvim functions"
|
|
vim.keymap.set("n", "<leader>fh", builtin.help_tags, opts)
|
|
|
|
-- Recent Commands
|
|
opts.desc = "Show recent commands"
|
|
vim.keymap.set('n', '<leader>frc', ':Telescope command_history<CR>', opts)
|
|
|
|
-- Recent Searches
|
|
opts.desc = "Show recent searches"
|
|
vim.keymap.set('n', '<leader>frs', ':Telescope search_history<CR>', opts)
|
|
|
|
-- Old Files
|
|
opts.desc = "Show recent files"
|
|
vim.keymap.set('n', '<leader>frf', ':Telescope oldfiles<CR>', opts)
|
|
|
|
-- Quickfix Items
|
|
opts.desc = "Show quickfix items"
|
|
vim.keymap.set('n', '<leader>fq', ':Telescope quickfix<CR>', opts)
|
|
|
|
-- Spell Suggestions
|
|
opts.desc = "Show spell suggestions"
|
|
vim.keymap.set('n', '<leader>fs', ':Telescope spell_suggest<CR>', opts)
|
|
|
|
-- Diagnostics
|
|
opts.desc = "Show diagnostics"
|
|
vim.keymap.set('n', '<leader>fd', ':Telescope diagnostics<CR>', opts)
|
|
|
|
-- Notifications
|
|
opts.desc = "Show notifications"
|
|
vim.keymap.set('n', '<leader>fn', ':Telescope notify<CR>', opts)
|
|
|
|
-- Implementations
|
|
opts.desc = "Show implementations"
|
|
vim.keymap.set('n', '<leader>fi', ':Telescope lsp_implementations<CR>', opts)
|
|
end,
|
|
}
|