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

Create Configuration for IncludeDeclaration #312

Closed rkk1995 closed 1 year ago

rkk1995 commented 1 year ago

Context

Currently, when references, implementations, or definitions is called, includeDeclaration is set to true by default.

This is cumbersome when you are on a definition and call lsp_references when there is only 1 reference. Instead of instantly jumping to said reference, a Trouble window appears including that sole reference as well as the your current position.

I'm sure there may be other scenarios, but this is the one I most frequently run into.

This PR

This PR adds a include_declaration list in the config. Only modes that are in this list will include_declaration set to true. All current modes using it have been set as a default so it doesn't break anyones workflow.

folke commented 1 year ago

thanks!