telescope

This commit is contained in:
mightypanders 2023-04-11 13:34:37 +02:00
parent 31bff1d28f
commit cf7e6e2aea

View File

@ -1,28 +1,49 @@
require('telescope').load_extension('lsp_handlers') require('telescope').load_extension('lsp_handlers')
local trouble = require('trouble.providers.telescope') local trouble = require('trouble.providers.telescope')
require('telescope').setup({ require('telescope').setup({
defaults={ defaults = {
mappings={ mappings = {
i = { ["<c-t>"] = trouble.open_with_trouble }, i = { ["<c-t>"] = trouble.open_with_trouble },
n = { ["<c-t>"] = trouble.open_with_trouble }, n = { ["<c-t>"] = trouble.open_with_trouble },
}, },
path_display={"smart"}, path_display = { "smart" },
}, },
pickers={ pickers = {
find_files={ live_grep = {
theme="dropdown", results_title = false,
layout_config={ layout_strategy = 'vertical',
horizontal= {width=0.5} 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 = { extensions = {
lsp_handlers = { lsp_handlers = {
code_action = { code_action = {
telescope = require('telescope.themes').get_dropdown({}), telescope = require('telescope.themes').get_dropdown({}),
}, },
}, },
}, },
}) })