dotfiles/nvim/lua/telescope_config.lua

50 lines
1.1 KiB
Lua

require('telescope').load_extension('lsp_handlers')
local trouble = require('trouble.providers.telescope')
require('telescope').setup({
defaults = {
mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble },
},
path_display = { "smart" },
},
pickers = {
live_grep = {
results_title = false,
layout_strategy = 'vertical',
dynamic_preview_title = true,
sorting_strategy = 'ascending',
additional_args = { '--trim' },
layout_config = {
prompt_position = 'top',
width = 0.95,
height = 0.95,
mirror = true,
--flex = {
-- flip_columns = 100,
-- flip_lines = 10,
-- vertical = {
-- mirror = false,
-- },
-- horizontal = {
-- mirror = false
-- },
--},
}
},
find_files = {
theme = "dropdown",
layout_config = {
horizontal = { width = 0.5 }
}
}
},
extensions = {
lsp_handlers = {
code_action = {
telescope = require('telescope.themes').get_dropdown({}),
},
},
},
})