Feature request: possibility of different grouping
Currently, when using with 'trouble.nvim' all found keyword comments are grouped by file. I often find myself wanting to look only at all TODOs. I can do that by unfolding everything and using built-in search, but it is a bit troublesome. Maybe there is a way to incorporate different grouping? So that folds represent different keywords and not files. Maybe a keymapping inside Trouble window?
Or is it better to open this issue in 'trouble.nvim'?
Command I am currently using: TroubleToggle todo.
I've thought about this as well. I think I'll add an option to change the grouping like you mention:
- group by file (default)
- group by type (diagnostics severity, todo keyword, ,...)
I'll add it to the list
Maybe it can be not a plugin option but something that can be picked by user in runtime? So by default it opens with file grouping but can be switched to type grouping and back.
@echasnovski yep, that's what I had in mind
Any update on this? I'd also find it useful to have nested folds (e.g. First level could be grouped by module/folder, second level by file).
As @tom-anders suggested, I also think that nested folds would be very useful. For example, in the Java/Scala world, we usually have our production code under src/main/scala and tests in src/test/scala. When navigating code, you are often only interested in usages (lsp_references) in the main code. So grouping like this would be ideal:
src/main/scala/
foo/File1
<the reference>
foo/File2
<the reference>
src/test/scala/
foo/File1Test
<the reference>
Depending on the build tool and configuration of the project there might be more directories like src/main/protobuf or src/it/scala for integration tests. It would therefore be great if a pattern could be configured instead of listing these directories manually.
With Trouble v3, this is finally possible! :)
The docs on this are still a bit lacking, but you can check out the builtin sources on how to change the groups and formats
Huzzah! Almost three years later!