Open camdencheek opened 11 months ago
This would be handy for us as well. Our use case - We've added secondary code host connections, but most users will only want to search the primary first. The secondary results may just be extra noise to them.
Stripe would like this feature too.
If we were to submit a pull request for this, should it be namedsearch.defaultContext
? Should it be a global/org/user setting or a site configuration setting?
This seems more complicated than expected because, today, the default search context is user configurable in the Search Contexts UI, and the default the user chooses is stored in the database using the setDefaultSearchContext
mutation. Not in the user settings JSON.
That means that if we just naively stuck a default in the site configuration (or global settings), it would only affect new user accounts, as existing user accounts will already have a setting saved in the database.
I think what we need to do instead is to migrate the default search context from a bespoke setting to a setting saved in the user's configuration. (Like how codeIntel.mixPreciseAndSearchBasedReferences
does.)
Then updating the global settings should work for existing accounts that haven't explicitly chosen some other context.
We've had a few requests for setting an instance-wide default search context so that an admin can set up the instance to be most useful for their devs by default.