nvim/lua/user/telescope.lua
RingOfStorms (Joshua Bell) dc3e319f27 Working on LSP and shit like that, Astro config is confusing, need to
learn it myself from scratch
2023-05-23 02:56:59 -05:00

42 lines
1.2 KiB
Lua

return {
"nvim-telescope/telescope.nvim",
commit = "40c31fdde93bcd85aeb3447bb3e2a3208395a868",
dependencies = {
{ "nvim-telescope/telescope-fzf-native.nvim", enabled = vim.fn.executable "make" == 1, build = "make" },
},
cmd = "Telescope",
opts = function()
local actions = require "telescope.actions"
local get_icon = require("astronvim.utils").get_icon
return {
defaults = {
prompt_prefix = string.format("%s ", get_icon "Search"),
selection_caret = string.format("%s ", get_icon "Selected"),
path_display = { "truncate" },
sorting_strategy = "ascending",
layout_config = {
horizontal = {
prompt_position = "top",
preview_width = 0.55,
},
vertical = {
mirror = false,
},
width = 0.87,
height = 0.80,
preview_cutoff = 120,
},
mappings = {
i = {
["<C-n>"] = actions.cycle_history_next,
["<C-p>"] = actions.cycle_history_prev,
["<C-j>"] = actions.move_selection_next,
["<C-k>"] = actions.move_selection_previous,
},
n = { ["q"] = actions.close },
},
},
}
end,
}