Skip to content

Commit

Permalink
fix(Handler/CodeLens): Fix command
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Tao <[email protected]>
  • Loading branch information
tcx4c70 committed Jan 31, 2024
1 parent 5ac5179 commit 7ff8f62
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Handlers/CodeLens.fs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,14 @@ module CodeLens =
let refNum = refs |> Seq.map (fun r -> r.Locations |> Seq.length) |> Seq.fold (+) 0
let title = sprintf "%d Reference(s)" refNum

let arg: ReferenceParams =
{ TextDocument = { Uri = lensData.DocumentUri }
Position = lensData.Position
Context = { IncludeDeclaration = true } }
let command =
{ Title = title
Command = "csharp.showReferences"
// TODO: we really want to pass some more info to the client
Arguments = None }
Command = "textDocument/references"
Arguments = Some [| arg |> serialize |] }

return { p with Command = Some command } |> success
}

0 comments on commit 7ff8f62

Please sign in to comment.