feat: add telescope ui-select

This commit is contained in:
Michael Mandl 2022-05-18 10:21:09 +02:00
parent a3d0c3623d
commit fde2607ca2
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
2 changed files with 17 additions and 8 deletions

View file

@ -141,11 +141,14 @@ return require('packer').startup(function(use)
-- Telescope -- Telescope
use({ use({
'nvim-telescope/telescope.nvim', "nvim-telescope/telescope.nvim",
requires = { { 'nvim-lua/plenary.nvim' } }, requires = {
config = function() require('plugins.telescope') end { "nvim-lua/plenary.nvim" },
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
{ "nvim-telescope/telescope-ui-select.nvim" },
},
config = function() require("plugins.telescope") end
}) })
use({ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' })
-- automatic pairs -- automatic pairs
use({ "Raimondi/delimitMate" }) use({ "Raimondi/delimitMate" })

View file

@ -1,6 +1,8 @@
local telescope = require("telescope")
local actions = require("telescope.actions") local actions = require("telescope.actions")
local themes = require("telescope.themes")
require('telescope').setup({ telescope.setup({
defaults = { defaults = {
mappings = { mappings = {
i = { i = {
@ -11,7 +13,7 @@ require('telescope').setup({
}, },
n = { n = {
["<ESC>"] = actions.close, ["<ESC>"] = actions.close,
['<C-c>'] = actions.close ["<C-c>"] = actions.close
} }
} }
}, },
@ -20,8 +22,12 @@ require('telescope').setup({
fuzzy = true, fuzzy = true,
override_generic_sorter = true, override_generic_sorter = true,
override_file_sorter = true override_file_sorter = true
} },
["ui-select"] = {
themes.get_dropdown({})
},
} }
}) })
require('telescope').load_extension('fzf') telescope.load_extension("fzf")
telescope.load_extension("ui-select")