From 69d18806f070230139e2cdfbf85ec45f51960c54 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Mon, 6 Feb 2023 13:37:38 +0100 Subject: [PATCH] nvim: use telescope for ui.select. add lsp code actions binding --- .config/nvim/lua/config/plugins/telescope.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.config/nvim/lua/config/plugins/telescope.lua b/.config/nvim/lua/config/plugins/telescope.lua index 5c98516..71d5fcc 100644 --- a/.config/nvim/lua/config/plugins/telescope.lua +++ b/.config/nvim/lua/config/plugins/telescope.lua @@ -12,6 +12,7 @@ local M = { "nvim-telescope/telescope-fzy-native.nvim", "nvim-telescope/telescope-github.nvim", "nvim-telescope/telescope-dap.nvim", + "nvim-telescope/telescope-ui-select.nvim", }, } @@ -34,6 +35,7 @@ function M.config() vim.keymap.set("n", "/", 'lua require("telescope.builtin").live_grep()') vim.keymap.set("n", ".", 'lua require("telescope.builtin").file_browser()') vim.keymap.set("n", "p", 'lua require("telescope.builtin").registers()') + vim.keymap.set("n", "ga", "lua vim.lsp.buf.code_action()") vim.keymap.set("n", "gr", 'lua require("telescope.builtin").lsp_references()') vim.keymap.set("n", "gd", 'lua require("telescope.builtin").lsp_definitions()') vim.keymap.set("n", "g/", 'lua require("telescope.builtin").lsp_document_symbols()') @@ -70,6 +72,13 @@ function M.config() grep_previewer = previewers.vim_buffer_vimgrep.new, qflist_previewer = previewers.vim_buffer_qflist.new, }, + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown({ + -- even more opts + }), + }, + }, }) local layout_strategies = require("telescope.pickers.layout_strategies") @@ -94,8 +103,7 @@ function M.config() telescope.load_extension("dap") telescope.load_extension("fzy_native") telescope.load_extension("gh") - -- telescope.load_extension("packer") -- currently breaking packer - -- + telescope.load_extension("ui-select") end return M