def get_script_completions(view, prefix, position, info):
	if not get_setting(view, "fw1_enabled"):
		return None

	if extends_fw1(view):
		if view.match_selector(position, "meta.class.body.cfml -meta.function.body -meta.struct-literal"):
			return CompletionList(fw1["methods"]["definitions"], 1, False)

		key = get_struct_var_assignment(view, position)
		completions = []
		if key and key in fw1["settings"]:
			return CompletionList(fw1["settings"][key], 1, False)

		return CompletionList(fw1["methods"]["calls"], 1, False)

	if get_file_type(view) in ["view","layout"]:
		return CompletionList(fw1["methods"]["calls"], 1, False)

	return None
dataset/ETHPy150Open jcberquist/sublimetext-cfml/src/fw1/fw1.py/get_script_completions/original