<commit_before>namespace Ionide.VSCode.FSharp

open Fable.Core
open Fable.Import.vscode

open DTO
open Ionide.VSCode.Helpers

module ParameterHints =

    let private createProvider () =
        let mapResult o =
            let res = SignatureHelp ()
            if isNotNull o then
                let sigs = o.Data.Overloads |> Array.choose (fun c ->
                    try
                        let tip = c.Tip.[0].[0]
                        let signature = SignatureInformation (tip.Signature, U2.Case1 tip.Comment)
                        c.Parameters |> Array.iter (fun p ->
                            let parameter = ParameterInformation (p.Name, U2.Case1 p.CanonicalTypeTextForSorting)
                            signature.parameters.Add (parameter )
                            |> ignore
                        )
                        Some signature
                    with
                    | e -> None) |> ResizeArray
                res.activeParameter <- float (o.Data.CurrentParameter)
                res.activeSignature <-
                    let sigs = sigs |> Seq.sortBy (fun n -> n.parameters.Count)
                    sigs
                    |> Seq.findIndex (fun s -> s.parameters.Count >= o.Data.CurrentParameter )
                    |> fun index -> if index + 1 >= (sigs |> Seq.length) then index else index + 1
                    |> float
                res.signatures <- sigs
            res

        { new SignatureHelpProvider
          with
            member __.provideSignatureHelp(doc,pos, ct) =<commit_msg>Fix styling of parameter hints<commit_after>namespace Ionide.VSCode.FSharp

open Fable.Core
open Fable.Import.vscode

open DTO
open Ionide.VSCode.Helpers

module ParameterHints =

    let private createProvider () =
        let mapResult o =
            let res = SignatureHelp ()
            if isNotNull o then
                let sigs = o.Data.Overloads |> Array.choose (fun c ->
                    try
                        let tip = c.Tip.[0].[0]
                        let signature = SignatureInformation (tip.Signature, U2.Case2 (tip.Comment |>  Markdown.createCommentBlock))
                        c.Parameters |> Array.iter (fun p ->
                            let parameter = ParameterInformation (p.Name, U2.Case1 p.CanonicalTypeTextForSorting)
                            signature.parameters.Add (parameter )
                            |> ignore
                        )
                        Some signature
                    with
                    | e -> None) |> ResizeArray
                res.activeParameter <- float (o.Data.CurrentParameter)
                res.activeSignature <-
                    let sigs = sigs |> Seq.sortBy (fun n -> n.parameters.Count)
                    sigs
                    |> Seq.findIndex (fun s -> s.parameters.Count >= o.Data.CurrentParameter )
                    |> fun index -> if index + 1 >= (sigs |> Seq.length) then index else index + 1
                    |> float
                res.signatures <- sigs
            res

        { new SignatureHelpProvider
          with
            member __.provideSignatureHelp(doc,pos, ct) =
{'fraction_non_alphanumeric': 0.08188428706923806, 'fraction_numerical': 0.005058488776478028, 'mean_word_length': 1.2616154395997141, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7199233', 'n_tokens_mistral': 831, 'n_tokens_neox': 760, 'n_words': 203}