       when 'var'
         createSuggestionForVariable(name)
       when 'private_function'
-        createSuggestionForFunction(serverSuggestion, name, kind, signature, "", desc, spec, prefix, pipeBefore)
+        createSuggestionForFunction(serverSuggestion, name, kind, signature, "", desc, spec, prefix, pipeBefore, captureBefore)
       when 'public_function'
-        createSuggestionForFunction(serverSuggestion, name, kind, signature, "", desc, spec, prefix, pipeBefore)
+        createSuggestionForFunction(serverSuggestion, name, kind, signature, "", desc, spec, prefix, pipeBefore, captureBefore)
       when 'function'
-        createSuggestionForFunction(serverSuggestion, name, kind, signature, mod, desc, spec, prefix, pipeBefore)
+        createSuggestionForFunction(serverSuggestion, name, kind, signature, mod, desc, spec, prefix, pipeBefore, captureBefore)
       when 'public_macro'
-        createSuggestionForFunction(serverSuggestion, name, kind, signature, "", desc, spec, prefix, pipeBefore)
+        createSuggestionForFunction(serverSuggestion, name, kind, signature, "", desc, spec, prefix, pipeBefore, captureBefore)
       when 'macro'
-        createSuggestionForFunction(serverSuggestion, name, kind, signature, mod, desc, spec, prefix, pipeBefore)
+        createSuggestionForFunction(serverSuggestion, name, kind, signature, mod, desc, spec, prefix, pipeBefore, captureBefore)
       when 'module'
         createSuggestionForModule(serverSuggestion, name, desc, prefix, subtype)
       else

    snippet_params = params
    snippet_params = snippet_params[1...] if snippet_params.length > 0 && pipeBefore

    if snippet_params.length > 0
      snippet = "#{func}(#{snippet_params.join(', ')})"

    snippet = snippet.replace(/^:/, '') + "$0"

    regex = /[\w0-9\._!\?\:@]+$/
    textBeforeCursor.match(regex)?[0] or ''

  createSuggestion = (serverSuggestion, fields, prefix, pipeBefore, captureBefore) ->
    if fields[1] == 'module'
      [name, kind, subtype, desc] = fields
    else
