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.24k stars 178 forks source link

feat: Add ability to define severity for `auto_open` #322

Closed cousine closed 4 months ago

cousine commented 1 year ago

Some LSPs are very noisy, and its very distracting to have trouble automatically open when the message is not important.

Also setting the global severity doesn't leave you a choice to deal with useful messages.

This PR allows you to define a map of vim.diagnostic.severity on the auto_open option to only open trouble when any of the results severities matches the list.

folke commented 4 months ago

Development on the main branch is EOL.

Trouble has been rewritten and will be merged in main soon.

This issue/feature either no longer exists or has been implemented on dev.

For more info, see https://github.com/folke/trouble.nvim/tree/dev

You can define a specifc mode for this with auto_open and a severity filter

cousine commented 4 months ago

@folke this looks cool! thanks for pointing it and the awesome effort on v3 🥇