remove experimental telescope layout

This commit is contained in:
Vladan Popovic 2024-03-20 02:19:53 +01:00
parent 351d1690aa
commit 6d04ade3e5

View file

@ -2,20 +2,8 @@ local telescope = require('telescope')
local actions = require('telescope.actions') local actions = require('telescope.actions')
local builtin = require('telescope.builtin') local builtin = require('telescope.builtin')
local luasnip = require('luasnip')
local lst = telescope.extensions.luasnip
telescope.setup { telescope.setup {
defaults = { defaults = {
layout_strategy = "vertical",
layout_config = {
vertical = {
prompt_position = "top",
},
horizontal = {
prompt_position = "bottom",
},
},
sorting_strategy = "ascending", sorting_strategy = "ascending",
live_grep_arguments = { 'rg', live_grep_arguments = { 'rg',
'--hidden', '--no-ignore', '--color=never', '--hidden', '--no-ignore', '--color=never',
@ -25,26 +13,11 @@ telescope.setup {
}, },
pickers = { pickers = {
live_grep = { live_grep = {
layout_strategy = "horizontal",
mappings = { mappings = {
i = { ["<c-f>"] = actions.to_fuzzy_refine }, i = { ["<c-f>"] = actions.to_fuzzy_refine },
}, },
}, },
find_files = {
previewer = false,
},
}, },
extensions = {
luasnip = {
search = function(entry)
return lst.filter_null(entry.context.trigger) .. " " ..
lst.filter_null(entry.context.name) .. " " ..
entry.ft .. " " ..
lst.filter_description(entry.context.name, entry.context.description) ..
lst.get_docstring(luasnip, entry.ft, entry.context)[1]
end
},
}
} }
vim.keymap.set('n', '<leader>ff', builtin.find_files, {}) vim.keymap.set('n', '<leader>ff', builtin.find_files, {})