folke / trouble.nvim

🚦 A pretty diagnostics, references, telescope results, quickfix and location list to help you solve all the trouble your code is causing.
Apache License 2.0
5.11k stars 173 forks source link

No documentation for filters (except for examples) #473

Closed tom-anders closed 2 weeks ago

tom-anders commented 1 month ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10.0

Operating system/version

Ubuntu 22

Describe the bug

README.md/trouble.nvim.txt give some examples that use filters, but I'm missing explicit documentation on how to use them and which keys are available (e.g. not, severity, etc.)

I think there also should be an example on how to register and use a custom lua function as a filter.

Steps To Reproduce

read the docs

Expected Behavior

Docs give more detailed information about using and adding filters, and the available options.

Repro

No response

tom-anders commented 1 month ago

Just wanted to say, Trouble v3 is an awesome update! But right now it's rather hard to configure things IMO, as you either need to look at the plugin's source code, or use the examples as "implicit documentation"

folke commented 1 month ago

Yeah, fair point. Still need to document filters / sorters / groupings / sections / formatters

b0ae989c commented 3 weeks ago

I can come up with some documentations for filters. Something similar to https://github.com/folke/noice.nvim?tab=readme-ov-file#-filters

The available ones are documented in https://github.com/folke/trouble.nvim/blob/38915023a777b7f2422e503dc603f6a64b465bf5/lua/trouble/filter.lua#L30-L74

folke commented 3 weeks ago

@b0ae989c that would be great! Know that with trouble, you can also filter on any item attribute.

I'd prefer having new docs under docs/filter.md and then add a link to it from the main readme.

Need to create other docs for formatting, sections, sorting, groups, etc