Code change:
} } <del> const tocHiddenDuringSearch = this.configurationService.getValue('workbench.settings.settingsSearchTocBehavior') === 'hide'; if (!tocHiddenDuringSearch) { // Sort the settings according to internal order if indexed. if (this.settingsOrderByTocIndex) { filterMatches.sort((a, b) => compareTwoNullableNumbers(a.setting.internalOrder, b.setting.internalOrder)); } return filterMatches; </del> <ins> // The search only has filters, so we can sort by the order in the TOC. if (!this._viewState.query) { return filterMatches.sort((a, b) => compareTwoNullableNumbers(a.setting.internalOrder, b.setting.internalOrder)); </ins> } <del> // The table of contents is hidden during the search. // The settings could appear in a more haphazard order. // Sort the settings according to their score. </del> <ins> // Sort the settings according to their relevancy. // https://github.com/microsoft/vscode/issues/197773 </ins> filterMatches.sort((a, b) => { if (a.matchType !== b.matchType) { // Sort by match type if the match types are not the same.

Related discussion:
text: <!-- Do Not Delete This! featurerequesttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Describe the feature you'd like. --This proposal affects Settings editor (Settings UI) users and extension authors. The search in the Settings editor currently shows results sorted by the table of contents so that commonly used settings can show up at the top, and so search results can be grouped by the entries in the table of contents. The change to sort the settings by table of contents was made as part of and However, the Settings editor performs two searches per query: the first search finds settings based on keyword matching, and the second search attempts to find relevant settings using similarity search algorithms. As a result, the second search is prone to finding less relevant settings, especially when the user had a specific keyword in mind. Because the Settings editor currently orders settings by the table of contents, the less relevant results from the second search sometimes end up showing above the keyword match results because they appear first in the table of contents. As an example, if I search "title bar style" in the Settings editor, actually shows up fifth due to table of contents sorting: ! This issue proposes reverting the settings search so that the keyword matches always appear at the top of the search results again. As part of this proposal, and would regress and become out of scope. In other words, ordering the search results so that keyword matches always appear first would break grouping the search results by the table of contents entries, but would make it so that users hopefully don't have to scroll down as much to find what they were looking for. Implementing this proposal would also break sorting extension search results by the settings order numbers given by the extension author in their extension's file. I noticed that the issue of having to scroll down to find a keyword match is made worse when the Settings editor is "small", such as when I restore/shrink the VS Code window. Screenreader users might also have to tab down more search results to get to the one they want. Feel free to upvote the proposal if you'd like to see it implemented, or downvote it if you'd like the settings search results ordering to remain the way it currently is. You're also welcome to comment on this issue with alternative suggestions for how the search results should be shown within the Settings editor.