def handle_function_completions(view, location):
    scopes = util.get_scopes(view, location)

    # >>> scopes = ["source.css", "meta.function.ca.c.css"]
    # >>> util.get_scope_that_starts_with(scopes, starts_with="meta.function.")
    # 'meta.function.calc.css'
    scope = util.get_scope_that_starts_with(scopes, starts_with="meta.function.")

    # "meta.function.calc.css" ->
    # ["meta", "function", "calc", "css"]
    #                      name
    name_index = -2
    func_name = scope.split(".")[name_index]

    return functions.get_completions(func_name)
def handle_function_completions(view, location):
    scopes = util.get_scopes(view, location)

    # >>> scopes = ["source.css", "meta.function.ca.c.css"]
    # >>> util.get_scope_that_starts_with(scopes, starts_with="meta.function.")
    # 'meta.function.calc.css'
    scope = util.get_scope_that_starts_with(scopes, starts_with="meta.function.")

    # "meta.function.calc.css" ->
    # ["meta", "function", "calc", "css"]
    #                      name
    name_index = -2
    func_name = scope.split(".")[name_index]

    return functions.get_completions(func_name)