From 169aa170a216f07af36a55f1305f8eea594aa2ef Mon Sep 17 00:00:00 2001 From: Squibid Date: Thu, 6 Jul 2023 12:35:56 -0400 Subject: change the look of telescope a bit and remove unneeded stuff --- after/plugin/telescope.lua | 13 +++++-------- lua/core/highlight.lua | 6 +++--- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua index 0674b21..9411e61 100644 --- a/after/plugin/telescope.lua +++ b/after/plugin/telescope.lua @@ -3,6 +3,7 @@ if not status_ok then return end local actions = require('telescope.actions') +local action_layout = require("telescope.actions.layout") telescope.setup { defaults = { @@ -12,31 +13,27 @@ telescope.setup { preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' }; }, sorting_strategy = 'ascending', + -- 'horizontal', 'vertical', 'bottom_pane', or 'cursor' layout_strategy = 'bottom_pane', layout_config = { - height = 0.3, + bottom_pane = { height = 0.4, }, }, mappings = { i = { + [""] = actions.close, [''] = 'which_key', [''] = actions.move_selection_next, [''] = actions.move_selection_previous, [''] = actions.select_default, [''] = actions.preview_scrolling_up, [''] = actions.preview_scrolling_down, + [""] = action_layout.toggle_preview }, n = { ["gg"] = actions.move_to_top, ["G"] = actions.move_to_bottom, }, }, - extensions = { - ["ui-select"] = { - require("telescope.themes").get_ivy { - -- even more opts - } - } - }, } } telescope.load_extension('file_browser') diff --git a/lua/core/highlight.lua b/lua/core/highlight.lua index 365c4b5..c90fd3f 100644 --- a/lua/core/highlight.lua +++ b/lua/core/highlight.lua @@ -23,9 +23,9 @@ highlight('EndOfBuffer', { fg = c.bg }) highlight('TelescopeMatching', { bg = c.gray01 }) highlight('TelescopeNormal', { bg = c.bg_dark }) -highlight('TelescopePreviewBorder', { bg = c.bg }) -highlight('TelescopePreviewNormal', { bg = c.bg }) -highlight('TelescopePreviewTitle', { bg = c.bg, fg = c.bg }) +highlight('TelescopePreviewBorder', { bg = c.bg_dark }) +highlight('TelescopePreviewNormal', { bg = c.bg_dark }) +highlight('TelescopePreviewTitle', { bg = c.bg_dark, fg = c.bg_dark }) highlight('TelescopePromptBorder', { bg = c.gray01 }) highlight('TelescopePromptNormal', { bg = c.gray01 }) -- cgit v1.2.1