|
| 1 | +return { -- Fuzzy Finder (files, lsp, etc) |
| 2 | + 'nvim-telescope/telescope.nvim', |
| 3 | + event = 'VimEnter', |
| 4 | + branch = '0.1.x', |
| 5 | + dependencies = { |
| 6 | + 'nvim-lua/plenary.nvim', |
| 7 | + { -- If encountering errors, see telescope-fzf-native README for installation instructions |
| 8 | + 'nvim-telescope/telescope-fzf-native.nvim', |
| 9 | + |
| 10 | + -- `build` is used to run some command when the plugin is installed/updated. |
| 11 | + -- This is only run then, not every time Neovim starts up. |
| 12 | + build = 'make', |
| 13 | + |
| 14 | + -- `cond` is a condition used to determine whether this plugin should be |
| 15 | + -- installed and loaded. |
| 16 | + cond = function() |
| 17 | + return vim.fn.executable 'make' == 1 |
| 18 | + end, |
| 19 | + }, |
| 20 | + { 'nvim-telescope/telescope-ui-select.nvim' }, |
| 21 | + |
| 22 | + -- Useful for getting pretty icons, but requires a Nerd Font. |
| 23 | + { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, |
| 24 | + }, |
| 25 | + config = function() |
| 26 | + -- Telescope is a fuzzy finder that comes with a lot of different things that |
| 27 | + -- it can fuzzy find! It's more than just a "file finder", it can search |
| 28 | + -- many different aspects of Neovim, your workspace, LSP, and more! |
| 29 | + -- |
| 30 | + -- The easiest way to use Telescope, is to start by doing something like: |
| 31 | + -- :Telescope help_tags |
| 32 | + -- |
| 33 | + -- After running this command, a window will open up and you're able to |
| 34 | + -- type in the prompt window. You'll see a list of `help_tags` options and |
| 35 | + -- a corresponding preview of the help. |
| 36 | + -- |
| 37 | + -- Two important keymaps to use while in Telescope are: |
| 38 | + -- - Insert mode: <c-/> |
| 39 | + -- - Normal mode: ? |
| 40 | + -- |
| 41 | + -- This opens a window that shows you all of the keymaps for the current |
| 42 | + -- Telescope picker. This is really useful to discover what Telescope can |
| 43 | + -- do as well as how to actually do it! |
| 44 | + |
| 45 | + -- [[ Configure Telescope ]] |
| 46 | + -- See `:help telescope` and `:help telescope.setup()` |
| 47 | + require('telescope').setup { |
| 48 | + -- You can put your default mappings / updates / etc. in here |
| 49 | + -- All the info you're looking for is in `:help telescope.setup()` |
| 50 | + -- |
| 51 | + -- defaults = { |
| 52 | + -- mappings = { |
| 53 | + -- i = { ['<c-enter>'] = 'to_fuzzy_refine' }, |
| 54 | + -- }, |
| 55 | + -- }, |
| 56 | + -- pickers = {} |
| 57 | + extensions = { |
| 58 | + ['ui-select'] = { |
| 59 | + require('telescope.themes').get_dropdown(), |
| 60 | + }, |
| 61 | + }, |
| 62 | + } |
| 63 | + |
| 64 | + -- Enable Telescope extensions if they are installed |
| 65 | + pcall(require('telescope').load_extension, 'fzf') |
| 66 | + pcall(require('telescope').load_extension, 'ui-select') |
| 67 | + |
| 68 | + -- See `:help telescope.builtin` |
| 69 | + end, |
| 70 | +} |
0 commit comments