-
Notifications
You must be signed in to change notification settings - Fork 177
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
Implement a "compact" flag #66
Conversation
Thanks @WhyNotHugo, loving this! |
Thanks. I'm currently using
I'm trying to figure out a way to use |
Hi! Thank you for this PR. Sorry for the delay, but I'm traveling right now. I'll be back next week. I have plans to allow custom grouping and also to disable grouping (which is basically what you added). Would be great to change your pr to allow the following settings instead:
Do you think this makes sense? |
@WhyNotHugo you can already pass options to Trouble. Either to the command with option=value, or by using the Lua api |
I think your approach makes a lot more sense. It's tidier, can do the same thing, and is a bit more flexible.
Those aren't the options that get passed to If I wanted two mappings that open |
Arguments passed to `:TroubleToggle` were being ignored. Process them just like arguments passed to `:Trouble`.
613fb36
to
a6880dd
Compare
Updated to implement I also noticed that |
Hint: |
The "group" flags avoids grouping results, which is very useful when only seeing results for a single file (where collapsing/expanding makes less sense). The "padding" flag controls whitespace around results, which also plays well with "group=false" too.
a6880dd
to
75521e7
Compare
Do you have any further feedback on this? I've done some testing with |
Thank you! |
This flag removes the header and extra spacing. It's suitable when using
lsp_document_diagnostics
, where including the filename and collapseicon is redundant (since there's only one file anyway).
I'm mostly using
Trouble
withlsp_document_diagnostics
, so I only see errors for the current file. I'd rather keep the error split small and fit as much content as possible, and this helps with that goal.The default behaviour remains the same, since the default is
compact=false
.Let me know if the change seems too invasive. I'd also like to add a mode where only diagnostics for the current line are shown, and
compact
fits well with that.