private static List<CompletionItem> getMacroCompletion(int startOffset, int caretOffset, String filter, Syntax syntax) {
List<CompletionItem> list = new ArrayList<CompletionItem>();
for(LatteMacro macro : MacroDefinitions.macros) {
macro.setSyntax(syntax);
if(macro.getMacro().startsWith(filter)) {
list.add(new LatteCompletionItem(macro, startOffset, caretOffset));
}
}
return list;
}