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: Single-line item in quickfix/location lists if there is one result per file #466

Closed
1 task done
serhez opened this issue Jun 1, 2024 · 3 comments · Fixed by #490
Closed
1 task done
Labels
enhancement New feature or request

Comments

@serhez
Copy link

serhez commented Jun 1, 2024

Did you check the docs?

  • I have read all the trouble.nvim docs

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

Currently, if using Telescope to search files (for example) and opening the selected files in a Trouble quickfix list, the results are shown as below:

Screenshot 2024-06-01 at 14 19 48

This is both inefficient in terms of screen space and in terms of traversing the list, as it requires double the lines and keypresses to go to an item than if each file result was in a single line (like it happens in the original quickfix list).

Describe the solution you'd like

Perhaps one way to manage this that seems faithful to this plugin's design would be to collapse two-line results into a single line. This behavior could also be toggleable via a config parameter.

Describe alternatives you've considered

N/A.

Additional context

No response

@serhez serhez added the enhancement New feature or request label Jun 1, 2024
@folke
Copy link
Owner

folke commented Jun 1, 2024

You can fully customize any view. Check the telescope mode config here: https://github.com/folke/trouble.nvim/blob/main/lua/trouble/sources/telescope.lua#L18

Set groups = {} change the section format to your liking

@folke folke closed this as not planned Won't fix, can't repro, duplicate, stale Jun 1, 2024
folke added a commit that referenced this issue Jun 9, 2024
@folke
Copy link
Owner

folke commented Jun 9, 2024

I just made a change so that when telescope results are just file listings, then mode telescope_files is used instead.
So this should now work out of the box

@serhez
Copy link
Author

serhez commented Jun 9, 2024

@folke Thanks for letting me know! Would it be possible to do this with Trouble's quickfix and location lists too?

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

Successfully merging a pull request may close this issue.

2 participants