Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable users to setup configuration for individual pickers #582

Closed
kkharji opened this issue Mar 1, 2021 · 2 comments · Fixed by #883
Closed

Enable users to setup configuration for individual pickers #582

kkharji opened this issue Mar 1, 2021 · 2 comments · Fixed by #883
Assignees
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@kkharji
Copy link
Member

kkharji commented Mar 1, 2021

Is your feature request related to a problem? Please describe.

It is quite hard for new users to configure there telescopes. Configuration recipes in the wiki prove that setting up telescope to user liking is difficult and a bit complex, thus requiring a lot of investment/

Describe the solution you'd like

In setup method, the user shall be able to:

  • Setup configuration (mappings, layout, sorters ...) for individual pickers
  • Reference functions by string rather than requiring the actions/preview module
require'telescope'.setup({
  defaults = {...};
  pickers = {
      git_status = { -- overrides git_status
        prompt_prefix = "git_status>",
        mappings = {}, 
        theme = dropdown,
      },
      dotfiles = { -- new custom picker
        func = "fd" -- that requires func to be defined
        prompt_prefix = "dotfiles>",
        cwd = 'path/to/dir',
        theme = full, -- gets merged to picker opts
        
      };
    }
  }

Describe alternatives you've considered

Currently the user need to define a custom, yet complex alternative to get individual pickers behaving or looking a certain way. For example, this is how my custom setup looks like https://gist.github.com/tami5/d49ac7f5fb6ce7d06788582446652760

While this setup serve my needs, new commers will need to copy and paste similar setups or be limited by design.

Additional context
#578

@kkharji kkharji added the enhancement Enhancement to performance, inner workings or existent features label Mar 1, 2021
@kkharji kkharji self-assigned this Mar 1, 2021
@elianiva
Copy link
Member

elianiva commented Mar 1, 2021

I agree with this, I have some simple wrapper functions on my config just to pass the different opts.

@tjdevries
Copy link
Member

We could do this for the builtin ones I think -- it seems a good idea.

I'm not as confident about doing it for custom ones. We can chat about that more though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants