This repository has been archived on 2024-10-06. You can view files and clone it, but cannot push or open issues or pull requests.
neovim/lua/plugins/telescope.lua

40 lines
1.5 KiB
Lua
Raw Normal View History

local telescope = require('telescope')
local actions = require('telescope.actions')
2023-08-03 02:49:25 +02:00
local builtin = require('telescope.builtin')
telescope.setup {
defaults = {
2024-02-25 22:45:46 +01:00
sorting_strategy = "ascending",
live_grep_arguments = { 'rg',
'--hidden', '--no-ignore', '--color=never',
'--with-filename', '--line-number',
'--column', '--smart-case', '--no-heading',
},
},
pickers = {
live_grep = {
mappings = {
i = { ["<c-f>"] = actions.to_fuzzy_refine },
},
},
},
}
2024-06-10 13:12:26 +02:00
vim.keymap.set('n', '<leader>ss', telescope.extensions.luasnip.luasnip, {})
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
vim.keymap.set('n', '<leader>fg', builtin.git_files, {})
vim.keymap.set('n', '<leader>gg', builtin.live_grep, {})
2024-06-10 13:12:26 +02:00
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
vim.keymap.set('n', '<leader>fs', builtin.lsp_dynamic_workspace_symbols, {})
vim.keymap.set('n', '<leader>fsd', builtin.lsp_document_symbols, {})
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
vim.keymap.set('n', '<leader>dd', builtin.diagnostics, {})
2024-06-10 13:12:26 +02:00
-- Use telescope for lsp definitions, calls and references
vim.keymap.set('n', '<leader>gd', builtin.lsp_definitions, {})
vim.keymap.set('n', '<leader>gr', builtin.lsp_references, {})
vim.keymap.set('n', '<leader>gi', builtin.lsp_implementations, {})
vim.keymap.set('n', '<leader>ci', builtin.lsp_incoming_calls, {})
vim.keymap.set('n', '<leader>co', builtin.lsp_outgoing_calls, {})