telescope.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. return {
  2. {
  3. "nvim-telescope/telescope.nvim",
  4. tag = "0.1.8",
  5. dependencies = { "nvim-lua/plenary.nvim" },
  6. config = function()
  7. require("telescope").setup({
  8. defaults = {
  9. -- Default configuration for telescope goes here:
  10. -- config_key = value,
  11. mappings = {
  12. i = {
  13. -- map actions.which_key to <C-h> (default: <C-/>)
  14. -- actions.which_key shows the mappings for your picker,
  15. -- e.g. git_{create, delete, ...}_branch for the git_branches picker
  16. ["<C-h>"] = "which_key",
  17. },
  18. },
  19. },
  20. pickers = {
  21. -- Default configuration for builtin pickers goes here:
  22. -- picker_name = {
  23. -- picker_config_key = value,
  24. -- ...
  25. -- }
  26. -- Now the picker_config_key will be applied every time you call this
  27. -- builtin picker
  28. },
  29. extensions = {
  30. -- Your extension configuration goes here:
  31. -- extension_name = {
  32. -- extension_config_key = value,
  33. -- }
  34. -- please take a look at the readme of the extension you want to configure
  35. },
  36. })
  37. end,
  38. },
  39. {
  40. "nvim-telescope/telescope-ui-select.nvim",
  41. config = function()
  42. -- This is your opts table
  43. require("telescope").setup({
  44. extensions = {
  45. ["ui-select"] = {
  46. require("telescope.themes").get_dropdown({
  47. -- even more opts
  48. }),
  49. -- pseudo code / specification for writing custom displays, like the one
  50. -- for "codeactions"
  51. -- specific_opts = {
  52. -- [kind] = {
  53. -- make_indexed = function(items) -> indexed_items, width,
  54. -- make_displayer = function(widths) -> displayer
  55. -- make_display = function(displayer) -> function(e)
  56. -- make_ordinal = function(e) -> string
  57. -- },
  58. -- -- for example to disable the custom builtin "codeactions" display
  59. -- do the following
  60. -- codeactions = false,
  61. -- }
  62. },
  63. },
  64. })
  65. -- To get ui-select loaded and working with telescope, you need to call
  66. -- load_extension, somewhere after setup function:
  67. require("telescope").load_extension("ui-select")
  68. end,
  69. },
  70. }