code: private CompletionProvider snippetWithOptionCompletion(CompletionProvider optionProvider,
              Supplier<Stream<? extends Snippet>> snippetsSupplier) {
          return (code, cursor, anchor) -> {
              List<Suggestion> result = new ArrayList<>();
              int pastSpace = code.lastIndexOf(' ') + 1; // zero if no space
              if (pastSpace == 0) {
                  result.addAll(optionProvider.completionSuggestions(code, cursor, anchor));
              }
              result.addAll(snippetCompletion(snippetsSupplier).completionSuggestions(code, cursor, anchor));
              anchor[0] += pastSpace;
              return result;
          };
      }
docs: Completion based on snippet supplier with -all -start (and sometimes -history) options