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

Layout for large screens suboptimal #899

Closed
PSeitz opened this issue Jun 8, 2021 · 4 comments
Closed

Layout for large screens suboptimal #899

PSeitz opened this issue Jun 8, 2021 · 4 comments
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@PSeitz
Copy link

PSeitz commented Jun 8, 2021

On large screens (3440x1440), the middle is pretty much empty in the show reference lsp integration.

Screenshot from 2021-06-08 07-23-29

@PSeitz PSeitz added the enhancement Enhancement to performance, inner workings or existent features label Jun 8, 2021
@l-kershaw
Copy link
Contributor

You can adjust your layout_defaults in your setup to make the layout of pickers better fit your screen size.

For example you could use the following:

require('telescope').setup({
  defaults = {
    layout_defaults = {
      horizontal = {
        width_padding = 0.2
      }
    }
  }
})

This example will adjust the space both to the left and right of any picker in the horizontal layout (as used in your screenshot) to be 20% of your screen width. This leaves 60% for the picker itself, which will reduce the amount of empty space in the middle of the screen. You can obviously adjust the exact number to suit your preferences 🙂


Note that we are currently working on a way to more easily set up preferences for layout (see #823), so you may need to update this config soon.

@PSeitz
Copy link
Author

PSeitz commented Jun 8, 2021

Thanks, then I will wait.

I think for this use case, the padding should only be active after a certain threshold, or even better (and probably easier) that you can set a maximum width for the window.

@l-kershaw
Copy link
Contributor

@PSeitz just a heads up that the layout preferences PR has now been merged.

With the new changes you can pass a function to determine the width of the picker exactly how you want, so your threshold idea wouldn't be to difficult to implement in your config files.

If you have any further problems with the layout stuff, feel free to ping me 🙂

@fdschmidt93
Copy link
Member

Closing this as it has become a stale issue and can easily be handled on the user side with good documentation. Please ping here if there is more to discuss.

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

No branches or pull requests

3 participants