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

Preview mode, toggle with a key #302

Open
jugarpeupv opened this issue Nov 7, 2024 · 1 comment
Open

Preview mode, toggle with a key #302

jugarpeupv opened this issue Nov 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jugarpeupv
Copy link

Hey!, thanks for this wonderful plugin and for implementing icons!

There is a feature pretty interesting that https://github.com/folke/trouble.nvim implements, which is when you press P, you toggle preview mode, therefore a pane is presented on top of your current buffer, and when you move in the trouble pane, the pane is updated with the contents of the file hovered

The main point here is that when you navigate out of the trouble pane, you return to the original buffer you had opened, and all the files opened do not mess with you jumplist locations etc, and you dont miss the original buffer

Currently, how this plugin works now, it is very similar to vscode, where you start opening files in new buffers and then if you want to go back to your original buffer then you have to press multiple times the navigate back key

I know this plugin can preview the buffer, but you have to press every time a key to view the content of the buffer

@MagicDuck
Copy link
Owner

MagicDuck commented Nov 8, 2024

hmm, we already have <Down> and <Up> in normal mode to easy preview locations and they don't pollute your buffer list (only adds the latest visited).

But I think what you are asking for is a combination of that + the Preview action we currently have, correct?
Basically floating preview instead of preview in a split.

Maybe we can add a new option, openTarget that can be either split or floatingWindow. Then you can just use <Up> and <Down>

@MagicDuck MagicDuck added the enhancement New feature or request label Nov 8, 2024
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

2 participants