Skip to content

Commit

Permalink
Add remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
georgewfraser committed Jun 13, 2018
1 parent fb9c98f commit a51f437
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
- Only re-analyze .fsx when # directives are changed
- Analyze project.assets.json lazily
- Only show progress bars once 1s has passed
- Try erasing source after cursor to speed up incremental re-compilation

# Features
- When build fails, create default options with incomplete context
- Run-test code lens
- Source dep on C# project
- Source dep on C# project
- Allow emitting obj/FscArgs.txt as a project-cracker backup
14 changes: 11 additions & 3 deletions src/FSharpLanguageServer/Conversions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ let asHover(FSharpToolTipText tips): Hover =
match t with
| FSharpToolTipElement.CompositionError(e) -> dprintfn "Error rendering tooltip: %s" e
| FSharpToolTipElement.None -> ()
| FSharpToolTipElement.Group elements ->
| FSharpToolTipElement.Group(elements) ->
yield! elements ]
let contents =
match elements with
Expand All @@ -78,14 +78,22 @@ let asHover(FSharpToolTipText tips): Hover =
[ yield HighlightedString(one.MainDescription, "fsharp")
match TipFormatter.docComment(one.XmlDoc) with
| None -> ()
| Some(markdown) -> yield PlainString(markdown) ]
| Some(markdown) -> yield PlainString(markdown + "\n\n")
match one.Remarks with
| None | Some("") -> ()
| Some(remarks) ->
yield PlainString("*" + remarks + "*\n\n") ]
| many ->
let last = List.last(many)
[ for e in many do
yield HighlightedString(e.MainDescription, "fsharp")
match TipFormatter.docSummaryOnly(last.XmlDoc) with
| None -> ()
| Some(markdown) -> yield PlainString(markdown) ]
| Some(markdown) -> yield PlainString(markdown)
match last.Remarks with
| None | Some("") -> ()
| Some(remarks) ->
yield PlainString("*" + remarks + "*\n\n") ]
{contents=contents; range=None}

/// Convert an F# `FSharpGlyph` to an LSP `CompletionItemKind`
Expand Down

0 comments on commit a51f437

Please sign in to comment.