ionide / ionide/FsAutoComplete
Improve output of `fsharp/documentation`
- Dominant language
- F#
- Stars
- 486
- Forks
- 169
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 5
Description
Right now, the output of `fsharp/documentation` is very ionide specific. For example, consider:
```json
{
"XmlKey": "M:Microsoft.FSharp.Collections.SeqModule.TryFind``1(Microsoft.FSharp.Core.FSharpFunc{``0,System.Boolean},System.Collections.Generic.IEnumerable{``0})",
"Constructors": [],
"Fields": [],
"Functions": [],
"Interfaces": [],
"Attributes": [],
"Types": [],
"Signature": "val tryFind: \n predicate: 'T -> bool ->\n source : seq<'T> \n -> Option<'T>",
"Comment": "**Description**\n\nReturns the first element for which the given function returns True.\n Return None if no such element exists.\n\n**Parameters**\n\n* `predicate`: A function that evaluates to a Boolean when given an item in the sequence.\n* `source`: The input sequence.\n\n**Returns**\n\nThe found element or None.\n\n**Exceptions**\n\n* `System.ArgumentNullException`: Thrown when the input sequence is null.\n\n**Generic parameters**\n\n* `'T` is `string`",
"Footer": "Full name: Microsoft.FSharp.Collections.Seq.tryFind\nDeclaring Entity: Seq\nAssembly: FSharp.Core"
}
```
This has a mix of markdown and html in it, as well as ionide specific commands, which makes it rather difficult to consume for other tools. I propose that we make the output a bit more generic by doing something along the lines of
```json
{
"XmlKey": "M:Microsoft.FSharp.Collections.SeqModule.TryFind``1(Microsoft.FSharp.Core.FSharpFunc{``0,System.Boolean},System.Collections.Generic.IEnumerable{``0})",
"Constructors": [],
"Fields": [],
"Functions": [],
"Interfaces": [],
"Attributes": [],
"Types": [],
"Signature": {
"Text" : "val tryFind: \n predicate: 'T -> bool ->\n source : seq<'T> -> \n Option<'T>",
"Links": [{"Span" : { "Start" : , "End" : }, "Link" : "?%5B%7B%20%22XmlDocSig%22%3A%20%22T%3AMicrosoft.FSharp.Collections.SeqModule%22%2C%20%22AssemblyName%22%3A%20%22FSharp.Core%22%7D%5D"}, ...],
"Comment" : {
"Description" : "Returns the first element ...",
"Parameters" : ...,
...
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.