<commit_before>let s:save_cpo = &cpoptions
set cpoptions&vim

let s:seq = get(s:, 'seq', 0)

function! OmniSharp#actions#signature#SignatureHelp(...) abort
  let opts = a:0 ? a:1 : {}
  augroup OmniSharp_signature_help_insert
    autocmd!
    " Update the signature help box when new text is inserted.
    autocmd TextChangedI <buffer>
    \ call  OmniSharp#actions#signature#SignatureHelp()

    " Remove this augroup when leaving insert mode
    autocmd InsertLeave <buffer>
    \ autocmd! OmniSharp_signature_help_insert
  augroup END
  if g:OmniSharp_server_stdio
    call s:StdioSignatureHelp(function('s:CBSignatureHelp', [opts]), opts)
  else
    let response = OmniSharp#py#Eval('signatureHelp()')
    if OmniSharp#py#CheckForError() | return | endif
    call s:CBSignatureHelp(opts, response)
  endif
endfunction

function! s:StdioSignatureHelp(Callback, opts) abort
  let s:seq += 1
  let opts = {
  \ 'ResponseHandler': function('s:StdioSignatureHelpRH',
  \   [a:Callback, s:seq, a:opts])
  \}
  if has_key(a:opts, 'ForCompleteMethod')
    " Awkward hacks required:
    if !g:OmniSharp_want_snippet
      " We are requesting signatureHelp from a completion popup. This means our
      " line currently looks something like this:<commit_msg>Do not update popup when shown for completion<commit_after>let s:save_cpo = &cpoptions
set cpoptions&vim

let s:seq = get(s:, 'seq', 0)

function! OmniSharp#actions#signature#SignatureHelp(...) abort
  let opts = a:0 ? a:1 : {}
  if !has_key(opts, 'ForCompleteMethod')
    augroup OmniSharp_signature_help_insert
      autocmd!
      " Update the signature help box when new text is inserted.
      autocmd TextChangedI <buffer>
      \ call  OmniSharp#actions#signature#SignatureHelp()

      " Remove this augroup when leaving insert mode
      autocmd InsertLeave <buffer>
      \ autocmd! OmniSharp_signature_help_insert
    augroup END
  endif
  if g:OmniSharp_server_stdio
    call s:StdioSignatureHelp(function('s:CBSignatureHelp', [opts]), opts)
  else
    let response = OmniSharp#py#Eval('signatureHelp()')
    if OmniSharp#py#CheckForError() | return | endif
    call s:CBSignatureHelp(opts, response)
  endif
endfunction

function! s:StdioSignatureHelp(Callback, opts) abort
  let s:seq += 1
  let opts = {
  \ 'ResponseHandler': function('s:StdioSignatureHelpRH',
  \   [a:Callback, s:seq, a:opts])
  \}
  if has_key(a:opts, 'ForCompleteMethod')
    " Awkward hacks required:
    if !g:OmniSharp_want_snippet
      " We are requesting signatureHelp from a completion popup. This means our
      " line currently looks something like this:
{'fraction_non_alphanumeric': 0.09757971571263926, 'fraction_numerical': 0.003073376872839032, 'mean_word_length': 4.208, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2875811', 'n_tokens_mistral': 864, 'n_tokens_neox': 825, 'n_words': 224}