Skip to content

Commit

Permalink
filter if empty locations
Browse files Browse the repository at this point in the history
  • Loading branch information
kasiaMarek committed May 17, 2024
1 parent 8092497 commit 04c2c9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ final class ReferenceProvider(
.map(
_.flatten
.groupBy(_.symbol)
.map { case (symbol, refs) =>
.collect { case (symbol, refs) =>
ReferencesResult(symbol, refs.flatMap(_.locations))
}
.toList
Expand All @@ -228,7 +228,7 @@ final class ReferenceProvider(
scribe.debug(s"No semanticdb for $source")
pcReferences(source, params).map(
_.groupBy(_.symbol)
.map { case (symbol, refs) =>
.collect { case (symbol, refs) =>
ReferencesResult(symbol, refs.flatMap(_.locations))
}
.toList
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.eclipse.lsp4j.jsonrpc.messages.{Either => JEither}
case class PcReferencesRequest(
file: VirtualFileParams,
includeDefinition: Boolean,
offsetOrSymbol: JEither[Integer, String],
offsetOrSymbol: JEither[Integer, String]
) extends ReferencesRequest

case class PcReferencesResult(
Expand Down

0 comments on commit 04c2c9f

Please sign in to comment.