public static @Nullable Language getLanguageInEditor(final @NotNull Editor editor, final @NotNull Project project) {
    return getLanguageInEditor(editor.getCaretModel().getCurrentCaret(), project);
  }
public static @Nullable Language getLanguageInEditor(final @NotNull Editor editor, final @NotNull Project project)