List<LookupElement> (@NotNull CompletionParameters parameters) { return Collections.singletonList(LookupElementBuilder.create("{json is a great lang}") .withInsertHandler((context, item) -> { context.getDocument().insertString(context.getEditor().getCaretModel().getOffset(), "Customized insertion"); context.getEditor().getCaretModel().moveCaretRelatively("Customized insertion".length(), 0, true, false, true); })); }