From cf7e6e2aea7b98829d0f8cb01647313826bff4f5 Mon Sep 17 00:00:00 2001 From: mightypanders Date: Tue, 11 Apr 2023 13:34:37 +0200 Subject: [PATCH] telescope --- nvim/lua/telescope_config.lua | 55 ++++++++++++++++++++++++----------- 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/nvim/lua/telescope_config.lua b/nvim/lua/telescope_config.lua index 3a857c0..ff5c7fc 100644 --- a/nvim/lua/telescope_config.lua +++ b/nvim/lua/telescope_config.lua @@ -1,28 +1,49 @@ require('telescope').load_extension('lsp_handlers') local trouble = require('trouble.providers.telescope') require('telescope').setup({ - defaults={ - mappings={ + defaults = { + mappings = { i = { [""] = trouble.open_with_trouble }, n = { [""] = trouble.open_with_trouble }, }, - path_display={"smart"}, + path_display = { "smart" }, }, - pickers={ - find_files={ - theme="dropdown", - layout_config={ - horizontal= {width=0.5} + 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({}), - }, - }, - }, + extensions = { + lsp_handlers = { + code_action = { + telescope = require('telescope.themes').get_dropdown({}), + }, + }, + }, })