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

feature: Allow overriding filetype #475

Closed dmtrKovalenko closed 1 month ago

dmtrKovalenko commented 1 month ago

Did you check the docs?

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

I use another your plugin to make a nice sidebar with trouble windows (https://github.com/folke/edgy.nvim). But it is deduplicating windows by filetype so I would like to be able to set the custom file type per trouble window in the sidebar so they are always ordered correctly (now they might mix)

Describe the solution you'd like

I'd like to be able to do Trouble symbols focus=false filter.buf=0 results.win.bo.filetype=trouble_symbols it looks like it is just hardcoded and there is no requirements to specifically set file type for trouble

Describe alternatives you've considered

I didn't found the way to workaround

Additional context

No response

folke commented 1 month ago

Trouble exposes window vars that you can use. See how I use them in LazyVim: https://www.lazyvim.org/extras/ui/edgy