feat(telescope): use flex layout and tighten w/h's
This commit is contained in:
parent
eabc91a2ba
commit
b6b9bacf39
1 changed files with 22 additions and 15 deletions
|
@ -38,6 +38,15 @@ local opts_vertical = {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local opts_flex = {
|
||||||
|
layout_strategy = 'flex',
|
||||||
|
results_title = false,
|
||||||
|
layout_config = {
|
||||||
|
width = 0.5,
|
||||||
|
height = 0.6,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
require('telescope').setup(vim.tbl_deep_extend('force', {
|
require('telescope').setup(vim.tbl_deep_extend('force', {
|
||||||
defaults = {
|
defaults = {
|
||||||
prompt_prefix = '🔍 ',
|
prompt_prefix = '🔍 ',
|
||||||
|
@ -69,7 +78,7 @@ require('telescope').setup(vim.tbl_deep_extend('force', {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
buffers = {
|
buffers = vim.tbl_deep_extend('force', opts_flex, {
|
||||||
prompt_title = '✨ Search Buffers ✨',
|
prompt_title = '✨ Search Buffers ✨',
|
||||||
mappings = vim.tbl_deep_extend('force', {
|
mappings = vim.tbl_deep_extend('force', {
|
||||||
n = {
|
n = {
|
||||||
|
@ -78,7 +87,7 @@ require('telescope').setup(vim.tbl_deep_extend('force', {
|
||||||
}, default_mappings),
|
}, default_mappings),
|
||||||
sort_mru = true,
|
sort_mru = true,
|
||||||
preview_title = false,
|
preview_title = false,
|
||||||
},
|
}),
|
||||||
lsp_code_actions = vim.tbl_deep_extend('force', opts_cursor, {
|
lsp_code_actions = vim.tbl_deep_extend('force', opts_cursor, {
|
||||||
prompt_title = 'Code Actions',
|
prompt_title = 'Code Actions',
|
||||||
}),
|
}),
|
||||||
|
@ -97,33 +106,31 @@ require('telescope').setup(vim.tbl_deep_extend('force', {
|
||||||
prompt_title = 'Definitions',
|
prompt_title = 'Definitions',
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
}),
|
}),
|
||||||
lsp_references = vim.tbl_deep_extend('force', opts_cursor, {
|
lsp_references = vim.tbl_deep_extend('force', opts_vertical, {
|
||||||
prompt_title = 'References',
|
prompt_title = 'References',
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
}),
|
}),
|
||||||
find_files = {
|
find_files = vim.tbl_deep_extend('force', opts_flex, {
|
||||||
prompt_title = '✨ Search Project ✨',
|
prompt_title = '✨ Search Project ✨',
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
}),
|
||||||
diagnostics = {
|
diagnostics = vim.tbl_deep_extend('force', opts_vertical, {
|
||||||
initial_mode = 'normal',
|
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
},
|
}),
|
||||||
git_files = {
|
git_files = vim.tbl_deep_extend('force', opts_flex, {
|
||||||
prompt_title = '✨ Search Git Project ✨',
|
prompt_title = '✨ Search Git Project ✨',
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
hidden = true,
|
hidden = true,
|
||||||
},
|
}),
|
||||||
live_grep = {
|
live_grep = vim.tbl_deep_extend('force', opts_flex, {
|
||||||
prompt_title = '✨ Live Grep ✨',
|
prompt_title = '✨ Live Grep ✨',
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
},
|
}),
|
||||||
grep_string = {
|
grep_string = vim.tbl_deep_extend('force', opts_vertical, {
|
||||||
initial_mode = 'normal',
|
|
||||||
prompt_title = '✨ Grep String ✨',
|
prompt_title = '✨ Grep String ✨',
|
||||||
mappings = default_mappings,
|
mappings = default_mappings,
|
||||||
},
|
}),
|
||||||
},
|
},
|
||||||
}, config.telescope or {}))
|
}, config.telescope or {}))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue