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

[FEATURE] Add option to configure the picker window size #356

Closed
rafaelnp opened this issue Aug 20, 2024 · 3 comments
Closed

[FEATURE] Add option to configure the picker window size #356

rafaelnp opened this issue Aug 20, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@rafaelnp
Copy link

Is your feature request related to a problem? Please describe.
there is at the moment, AFAIK, no option to resize the picker window

Describe the solution you'd like
Add the configuration option to define the picker window size (e.g. percentage of neovim window)

Describe alternatives you've considered
none

Additional context
none

@rafaelnp rafaelnp added the enhancement New feature or request label Aug 20, 2024
@cameronr
Copy link
Collaborator

cameronr commented Aug 21, 2024

It's not well documented, but you can use the theme_conf config option to change the size of the picker. The easiest way to see the options is to look at the code:

https://github.com/nvim-telescope/telescope.nvim/blob/5972437de807c3bc101565175da66a1aa4f8707a/lua/telescope/themes.lua#L41

Adding this to your auto-session config sets the picker to 80% of the width and 50% of the height:

      ...
      session_lens = {
        theme_conf = {
          layout_config = {
            width = 0.8,
            height = 0.5,
          },
        },
      },

It also looks like there's a bug when setting it to 100% where you have to specify that slightly differently:
nvim-telescope/telescope.nvim#2508 (comment)

Does that help you do what you want? Assuming yes, what size do you want to make it (I'm just curious)?

If this solves it for you, I'll add some more documentation to the readme.

@rafaelnp
Copy link
Author

@cameronr Thanks for your suggestion and sorry for the late reply. Yes, it does work for me. 👍

@cameronr
Copy link
Collaborator

I'm doing a larger config overhaul so will include the docs in that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants