mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-09-01 08:15:20 +02:00
feat: pickers (#3053)
This commit is contained in:
parent
f34dbc94c2
commit
552197499c
1 changed files with 52 additions and 47 deletions
|
@ -1,5 +1,53 @@
|
||||||
local M = {}
|
local M = {}
|
||||||
|
|
||||||
|
local pickers = {
|
||||||
|
find_files = {
|
||||||
|
theme = "dropdown",
|
||||||
|
hidden = true,
|
||||||
|
previewer = false,
|
||||||
|
},
|
||||||
|
live_grep = {
|
||||||
|
--@usage don't include the filename in the search results
|
||||||
|
only_sort_text = true,
|
||||||
|
theme = "dropdown",
|
||||||
|
},
|
||||||
|
grep_string = {
|
||||||
|
only_sort_text = true,
|
||||||
|
theme = "dropdown",
|
||||||
|
},
|
||||||
|
buffers = {
|
||||||
|
theme = "dropdown",
|
||||||
|
previewer = false,
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
planets = {
|
||||||
|
show_pluto = true,
|
||||||
|
show_moon = true,
|
||||||
|
},
|
||||||
|
git_files = {
|
||||||
|
theme = "dropdown",
|
||||||
|
hidden = true,
|
||||||
|
previewer = false,
|
||||||
|
show_untracked = true,
|
||||||
|
},
|
||||||
|
lsp_references = {
|
||||||
|
theme = "dropdown",
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
lsp_definitions = {
|
||||||
|
theme = "dropdown",
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
lsp_declarations = {
|
||||||
|
theme = "dropdown",
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
lsp_implementations = {
|
||||||
|
theme = "dropdown",
|
||||||
|
initial_mode = "normal",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
function M.config()
|
function M.config()
|
||||||
-- Define this minimal config so that it's available if telescope is not yet available.
|
-- Define this minimal config so that it's available if telescope is not yet available.
|
||||||
|
|
||||||
|
@ -65,6 +113,7 @@ function M.config()
|
||||||
["dd"] = require("telescope.actions").delete_buffer,
|
["dd"] = require("telescope.actions").delete_buffer,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
pickers = pickers,
|
||||||
file_ignore_patterns = {},
|
file_ignore_patterns = {},
|
||||||
path_display = { "smart" },
|
path_display = { "smart" },
|
||||||
winblend = 0,
|
winblend = 0,
|
||||||
|
@ -73,53 +122,7 @@ function M.config()
|
||||||
color_devicons = true,
|
color_devicons = true,
|
||||||
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
|
set_env = { ["COLORTERM"] = "truecolor" }, -- default = nil,
|
||||||
},
|
},
|
||||||
pickers = {
|
pickers = pickers,
|
||||||
find_files = {
|
|
||||||
theme = "dropdown",
|
|
||||||
hidden = true,
|
|
||||||
previewer = false,
|
|
||||||
},
|
|
||||||
live_grep = {
|
|
||||||
--@usage don't include the filename in the search results
|
|
||||||
only_sort_text = true,
|
|
||||||
theme = "dropdown",
|
|
||||||
},
|
|
||||||
grep_string = {
|
|
||||||
only_sort_text = true,
|
|
||||||
theme = "dropdown",
|
|
||||||
},
|
|
||||||
buffers = {
|
|
||||||
theme = "dropdown",
|
|
||||||
previewer = false,
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
planets = {
|
|
||||||
show_pluto = true,
|
|
||||||
show_moon = true,
|
|
||||||
},
|
|
||||||
git_files = {
|
|
||||||
theme = "dropdown",
|
|
||||||
hidden = true,
|
|
||||||
previewer = false,
|
|
||||||
show_untracked = true,
|
|
||||||
},
|
|
||||||
lsp_references = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
lsp_definitions = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
lsp_declarations = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
lsp_implementations = {
|
|
||||||
theme = "dropdown",
|
|
||||||
initial_mode = "normal",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
extensions = {
|
extensions = {
|
||||||
fzf = {
|
fzf = {
|
||||||
fuzzy = true, -- false will only do exact matching
|
fuzzy = true, -- false will only do exact matching
|
||||||
|
@ -157,8 +160,10 @@ function M.setup()
|
||||||
["<C-n>"] = actions.move_selection_next,
|
["<C-n>"] = actions.move_selection_next,
|
||||||
["<C-p>"] = actions.move_selection_previous,
|
["<C-p>"] = actions.move_selection_previous,
|
||||||
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
["<C-q>"] = actions.smart_send_to_qflist + actions.open_qflist,
|
||||||
|
["dd"] = require("telescope.actions").delete_buffer,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
pickers = pickers,
|
||||||
}, lvim.builtin.telescope)
|
}, lvim.builtin.telescope)
|
||||||
|
|
||||||
local telescope = require "telescope"
|
local telescope = require "telescope"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue