Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit 585122e

Browse files
authored
Sort Squirrel refs (#782)
1 parent 5bf1f99 commit 585122e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

template/src/search/squirrel.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable @typescript-eslint/consistent-type-assertions */
22

3+
import { sortBy } from 'lodash'
34
import * as sourcegraph from 'sourcegraph'
45

56
import { PromiseProviders } from '../providers'
@@ -21,6 +22,8 @@ export const mkSquirrel = (api: API): PromiseProviders => ({
2122
return null
2223
}
2324

25+
symbol.refs = sortBy(symbol.refs, reference => reference.row)
26+
2427
return symbol.refs.map(reference =>
2528
mkSourcegraphLocation({ ...parseGitURI(new URL(document.uri)), ...reference })
2629
)

0 commit comments

Comments
 (0)