diff options
Diffstat (limited to 'neovim/.config/nvim/lua/plugins/fuzzyfinder.lua')
| -rw-r--r-- | neovim/.config/nvim/lua/plugins/fuzzyfinder.lua | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/neovim/.config/nvim/lua/plugins/fuzzyfinder.lua b/neovim/.config/nvim/lua/plugins/fuzzyfinder.lua index 444d9ff..2ed9970 100644 --- a/neovim/.config/nvim/lua/plugins/fuzzyfinder.lua +++ b/neovim/.config/nvim/lua/plugins/fuzzyfinder.lua | |||
| @@ -1,10 +1,32 @@ | |||
| 1 | return { | 1 | return { |
| 2 | "ctrlpvim/ctrlp.vim", | 2 | "nvim-telescope/telescope.nvim", |
| 3 | init = function() | 3 | -- Not left to lazy-load off `keys`: telescope-ui-select's vim.ui.select() |
| 4 | -- Use ripgrep for listing files (fast, respects .gitignore) | 4 | -- override (below) needs to be installed from startup, otherwise |
| 5 | if vim.fn.executable("rg") == 1 then | 5 | -- overseer's <leader>rr / nvim-dap-python's <leader>dc pickers fall back |
| 6 | vim.g.ctrlp_user_command = 'rg %s --files --color=never --glob ""' | 6 | -- to Neovim's default list until something (e.g. <C-p>) happens to |
| 7 | vim.g.ctrlp_use_caching = 0 | 7 | -- trigger telescope's own lazy-load first. |
| 8 | end | 8 | lazy = false, |
| 9 | dependencies = { | ||
| 10 | "nvim-lua/plenary.nvim", | ||
| 11 | "nvim-telescope/telescope-ui-select.nvim", | ||
| 12 | }, | ||
| 13 | keys = { | ||
| 14 | { "<C-p>", "<cmd>Telescope find_files<cr>" }, | ||
| 15 | { "<leader>fg", "<cmd>Telescope live_grep<cr>" }, | ||
| 16 | { "<leader>fb", "<cmd>Telescope buffers<cr>" }, | ||
| 17 | }, | ||
| 18 | config = function() | ||
| 19 | -- telescope-ui-select makes vim.ui.select() - overseer's <leader>rr | ||
| 20 | -- template picker, nvim-dap-python's launch-config picker, LSP code | ||
| 21 | -- actions, etc. - a scrollable/fuzzy-searchable Telescope window | ||
| 22 | -- instead of Neovim's default numbered-list-in-the-cmdline prompt. | ||
| 23 | require("telescope").setup({ | ||
| 24 | extensions = { | ||
| 25 | ["ui-select"] = { | ||
| 26 | require("telescope.themes").get_dropdown({}), | ||
| 27 | }, | ||
| 28 | }, | ||
| 29 | }) | ||
| 30 | require("telescope").load_extension("ui-select") | ||
| 9 | end, | 31 | end, |
| 10 | } | 32 | } |
