OliverChao / telescope-picker-list.nvim

A plugin that helps you use any picker in telescope.
13 stars 1 forks source link

Add ability to add alias for picker #2

Open mmohaveri opened 9 months ago

mmohaveri commented 9 months ago

It would be awesome if we had the ability to add alias for pickers, for example: I use toggleterm to manage my terminals and I'm using a telescope picker to manage toggleterm, its picker is named "toggleterm_manager" but it would be much better if I was able to alias the name "terminal" for this picker.

OliverChao commented 9 months ago

hey @mmohaveri , thanks for your advice. And I think we can access this feature without adding any code.

  1. picker-list will collect extensions loaded before it. And you can change the loading order on purpose. For example,
    require("telescope").load_extension("normal extensions")
    require("telescope").load_extension("picker_list")
    require("telescope").load_extension("you want to add alias")

    and then add name alias in user_pickers section.

    
        user_pickers = {
          {
            "name alias",
            function()
              vim.cmd([[Telescope ...]])
            end,
          },