change the look of telescope a bit and remove unneeded stuff
This commit is contained in:
@ -3,6 +3,7 @@ if not status_ok then
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local actions = require('telescope.actions')
|
local actions = require('telescope.actions')
|
||||||
|
local action_layout = require("telescope.actions.layout")
|
||||||
|
|
||||||
telescope.setup {
|
telescope.setup {
|
||||||
defaults = {
|
defaults = {
|
||||||
@ -12,31 +13,27 @@ telescope.setup {
|
|||||||
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
preview = {' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ' };
|
||||||
},
|
},
|
||||||
sorting_strategy = 'ascending',
|
sorting_strategy = 'ascending',
|
||||||
|
-- 'horizontal', 'vertical', 'bottom_pane', or 'cursor'
|
||||||
layout_strategy = 'bottom_pane',
|
layout_strategy = 'bottom_pane',
|
||||||
layout_config = {
|
layout_config = {
|
||||||
height = 0.3,
|
bottom_pane = { height = 0.4, },
|
||||||
},
|
},
|
||||||
mappings = {
|
mappings = {
|
||||||
i = {
|
i = {
|
||||||
|
["<esc>"] = actions.close,
|
||||||
['<C-h>'] = 'which_key',
|
['<C-h>'] = 'which_key',
|
||||||
['<C-j>'] = actions.move_selection_next,
|
['<C-j>'] = actions.move_selection_next,
|
||||||
['<C-k>'] = actions.move_selection_previous,
|
['<C-k>'] = actions.move_selection_previous,
|
||||||
['<C-l>'] = actions.select_default,
|
['<C-l>'] = actions.select_default,
|
||||||
['<C-u>'] = actions.preview_scrolling_up,
|
['<C-u>'] = actions.preview_scrolling_up,
|
||||||
['<C-d>'] = actions.preview_scrolling_down,
|
['<C-d>'] = actions.preview_scrolling_down,
|
||||||
|
["<C-p>"] = action_layout.toggle_preview
|
||||||
},
|
},
|
||||||
n = {
|
n = {
|
||||||
["gg"] = actions.move_to_top,
|
["gg"] = actions.move_to_top,
|
||||||
["G"] = actions.move_to_bottom,
|
["G"] = actions.move_to_bottom,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extensions = {
|
|
||||||
["ui-select"] = {
|
|
||||||
require("telescope.themes").get_ivy {
|
|
||||||
-- even more opts
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
telescope.load_extension('file_browser')
|
telescope.load_extension('file_browser')
|
||||||
|
@ -23,9 +23,9 @@ highlight('EndOfBuffer', { fg = c.bg })
|
|||||||
highlight('TelescopeMatching', { bg = c.gray01 })
|
highlight('TelescopeMatching', { bg = c.gray01 })
|
||||||
highlight('TelescopeNormal', { bg = c.bg_dark })
|
highlight('TelescopeNormal', { bg = c.bg_dark })
|
||||||
|
|
||||||
highlight('TelescopePreviewBorder', { bg = c.bg })
|
highlight('TelescopePreviewBorder', { bg = c.bg_dark })
|
||||||
highlight('TelescopePreviewNormal', { bg = c.bg })
|
highlight('TelescopePreviewNormal', { bg = c.bg_dark })
|
||||||
highlight('TelescopePreviewTitle', { bg = c.bg, fg = c.bg })
|
highlight('TelescopePreviewTitle', { bg = c.bg_dark, fg = c.bg_dark })
|
||||||
|
|
||||||
highlight('TelescopePromptBorder', { bg = c.gray01 })
|
highlight('TelescopePromptBorder', { bg = c.gray01 })
|
||||||
highlight('TelescopePromptNormal', { bg = c.gray01 })
|
highlight('TelescopePromptNormal', { bg = c.gray01 })
|
||||||
|
Reference in New Issue
Block a user