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

Bottom horizontal split theme #765

Closed
AnatoleLucet opened this issue Apr 16, 2021 · 15 comments
Closed

Bottom horizontal split theme #765

AnatoleLucet opened this issue Apr 16, 2021 · 15 comments
Labels
enhancement Enhancement to performance, inner workings or existent features Feature Request A request for a new feature or capabilities for telescope

Comments

@AnatoleLucet
Copy link

Is your feature request related to a problem? Please describe.
This is just a feature I think some people might like (including myself).

Describe the solution you'd like
I'd be nice to have a theme where the results are shown in a horizontal split at the bottom of the screen.
For e.g. something like CoC's fuzzy finder:

image

I'd personally prefer this layout in a few cases like the commands built-in.

@AnatoleLucet AnatoleLucet added the enhancement Enhancement to performance, inner workings or existent features label Apr 16, 2021
@kkharji kkharji added Feature Request A request for a new feature or capabilities for telescope help wanted Extra attention is needed labels Apr 16, 2021
@tjdevries
Copy link
Member

How about something like this:

#771

It's just a rough draft

@AnatoleLucet
Copy link
Author

It's looking great, thanks!
If the input is on the top, maybe the results list could go from top to bottom / stick to the top of the "results buffer"?
I also think that an horizontal line on the top'd nice to mark the separation between telescope and the background (like the borders of the other themes).

@elianiva
Copy link
Member

If the input is on the top, maybe the results list could go from top to bottom / stick to the top of the "results buffer"?

this part is configurable

@tjdevries
Copy link
Member

OK, you can try this now with:

lua require('telescope.builtin').find_files(require('telescope.themes').get_ivy())

Let me know if that is what you're looking for. It still allows for all the normal telescope configurations.

@tjdevries
Copy link
Member

image

image

@smithbm2316
Copy link
Contributor

@tjdevries thanks for the hard work on this new layout, I'm really looking forward to playing around with it! Is there a particular difference between setting your default layout_strategy to bottom_pane versus using the ivy theme, other than all of your pickers would be using the bottom_pane strategy by default? Or is it otherwise the same pretty much?

Hope you had a wonderful vacation! I'm looking forward to popping into a Teej stream again soon 😃

@tjdevries
Copy link
Member

layout_strategies are only for how the windows are laid out.

themes are for combining layout_strategies, sorting_strategies, borders and more to make a cohesive unit that is easy for end users to consu.e

So the ivy theme, sets the sorting, borders, bordercharsx, etc. to make it look "ivy-ish". While the layout_strategy is ONLY concerned with where to place the windows.

@AnatoleLucet
Copy link
Author

Thanks. It's looking great!
Though there seems to be some minor issues with Airline:
image
The status line seems to be blended into the telescope popup.

@evolify
Copy link

evolify commented Jun 1, 2021

OK, you can try this now with:

lua require('telescope.builtin').find_files(require('telescope.themes').get_ivy())

Let me know if that is what you're looking for. It still allows for all the normal telescope configurations.

It's great, but I wonder how to put the prompt in the bottom?

@Conni2461
Copy link
Member

It's great, but I wonder how to put the prompt in the bottom?

Currently not supported. PR welcome :)

@Conni2461 Conni2461 removed the help wanted Extra attention is needed label Jul 1, 2021
@smackesey
Copy link
Contributor

This is really great, and I'd love to use it as a quickfix replacement. In order to do that, one would need to be able to:

  1. Switch out of the Telescope window while leaving it open.
  2. Have mappings to move to the next/prev selection in the Telescope window and jump to that location while maintaining focus in the current window.

Is there any plan to support functionality like this?

@zetashift
Copy link

Is there also a way to get the ivy theme to have less height? Using the ivy theme with the file_browser makes the window take 50% of my my screen

image

@smackesey
Copy link
Contributor

@zetashift Not sure if it's the best way, but you can modify various params of the theme like this:

local theme = require('telescope.themes').get_ivy()
theme['find_command'] = opts.find_command
theme['layout_config']['height'] = 10
require('telescope.builtin').find_files(theme)

@zetashift
Copy link

@smackesey thanks that worked!

@l-kershaw
Copy link
Contributor

Closing now as the bottom_pane layout now supports the prompt_position option, so everything directly related to the original issue is implemented.

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 Feature Request A request for a new feature or capabilities for telescope
Projects
None yet
Development

No branches or pull requests

10 participants