2023-12-18 14:27:58 +01:00
|
|
|
local telescope = require('telescope')
|
2024-01-03 00:15:20 +01:00
|
|
|
local actions = require('telescope.actions')
|
2023-08-03 02:49:25 +02:00
|
|
|
local builtin = require('telescope.builtin')
|
|
|
|
|
2023-12-18 14:27:58 +01:00
|
|
|
telescope.setup {
|
|
|
|
defaults = {
|
2024-02-25 22:45:46 +01:00
|
|
|
layout_strategy = "vertical",
|
|
|
|
layout_config = {
|
|
|
|
vertical = {
|
|
|
|
prompt_position = "top",
|
|
|
|
},
|
|
|
|
horizontal = {
|
|
|
|
prompt_position = "bottom",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
sorting_strategy = "ascending",
|
2024-01-03 00:15:20 +01:00
|
|
|
live_grep_arguments = { 'rg',
|
|
|
|
'--hidden', '--no-ignore', '--color=never',
|
2023-12-18 14:27:58 +01:00
|
|
|
'--with-filename', '--line-number',
|
2024-01-03 00:15:20 +01:00
|
|
|
'--column', '--smart-case', '--no-heading',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pickers = {
|
|
|
|
live_grep = {
|
2024-02-25 22:45:46 +01:00
|
|
|
layout_strategy = "horizontal",
|
2024-01-03 00:15:20 +01:00
|
|
|
mappings = {
|
|
|
|
i = { ["<c-f>"] = actions.to_fuzzy_refine },
|
|
|
|
},
|
2023-12-18 14:27:58 +01:00
|
|
|
},
|
2024-02-25 22:45:46 +01:00
|
|
|
find_files = {
|
|
|
|
previewer = false,
|
|
|
|
},
|
2023-12-18 14:27:58 +01:00
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2024-01-03 00:15:20 +01:00
|
|
|
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, {})
|
|
|
|
vim.keymap.set('n', '<leader>bb', builtin.buffers, {})
|
|
|
|
vim.keymap.set('n', '<leader>hh', builtin.help_tags, {})
|
|
|
|
vim.keymap.set('n', '<leader>ss', builtin.lsp_dynamic_workspace_symbols, {})
|
|
|
|
vim.keymap.set('n', '<leader>sd', builtin.lsp_document_symbols, {})
|
|
|
|
vim.keymap.set('n', '<leader>dd', builtin.diagnostics, {})
|
|
|
|
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, {})
|