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

Commit

Permalink
feat: add "Fuzzy" badge to returned def/ref locations
Browse files Browse the repository at this point in the history
  • Loading branch information
sqs committed Jan 4, 2019
1 parent 6d4b92a commit 181f77c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions package.json
Expand Up @@ -66,6 +66,13 @@
"title": "${config.basicCodeIntel.definition.crossRepository && \"Disable\" || \"Enable\"} cross-repository definitions",
"category": "Basic code intel"
},
{
"id": "basicCodeIntel.fuzzyLocationIndicator",
"actionItem": {
"label": "Fuzzy",
"description": "Matched using text search heuristics"
}
},
{
"id": "basicCodeIntel.old.togglePreciseFuzzy",
"command": "basicCodeIntel.old.togglePreciseFuzzy",
Expand Down Expand Up @@ -106,6 +113,12 @@
"action": "basicCodeIntel.toggle",
"when": "((panel.activeView.id == 'def') || (panel.activeView.id == 'references')) && clientApplication.extensionAPIVersion.major >= 3"
}
],
"location/title": [
{
"action": "basicCodeIntel.fuzzyLocationIndicator",
"when": "basicCodeIntel.fuzzy"
}
]
},
"configuration": {
Expand Down
1 change: 1 addition & 0 deletions src/handler.ts
Expand Up @@ -113,6 +113,7 @@ function resultToLocation(res: Result): sourcegraph.Location {
res.end.line,
res.end.character
),
context: { 'basicCodeIntel.fuzzy': true },
}
}

Expand Down

0 comments on commit 181f77c

Please sign in to comment.