       "http://elixir-lang.org/docs/v#{ELIXIR_VERSION}/elixir/#{module}.html\##{func}/#{arity}"
 
   sortSuggestions = (suggestions) ->
-    sort_kind = (a, b) ->
+    sortKind = (a, b) ->
       priority =
         exception: 0 # unknown
         property:  0 # module attribute

    description = markdownToHTML(description)

    {
      snippet: snippet
      displayText: displayText
      type: type


      priority[a.type] - priority[b.type]

    sortText = (a, b) ->
      if a.displayText > b.displayText then 1 else if a.displayText < b.displayText then -1 else 0

    isFunc = (suggestion) ->
      !!(suggestion.func)

    sortFunctionByName = (a, b) ->
      return 0 if !isFunc(a) || !isFunc(b)
      if a.func > b.func then 1 else if a.func < b.func then -1 else 0

    sortFunctionByArity = (a, b) ->
      return 0 if !isFunc(a) || !isFunc(b)
      if a.arity > b.arity then 1 else if a.arity < b.arity then -1 else 0

    sortFunc = (a, b) ->
      sortKind(a, b) || sortFunctionByName(a, b) || sortFunctionByArity(a, b) || sortText(a, b)

    suggestions.sort(sortFunc)

  markdownToHTML = (mdText) ->
    marked.setOptions({
