module Pagy::SearchkickExtra::PagyExtension

def new_from_searchkick(results, **vars)

Create a Pagy object from a Searchkick::Results object
def new_from_searchkick(results, **vars)
  vars[:limit] = results.options[:per_page]
  vars[:page]  = results.options[:page]
  vars[:count] = results.total_count
  new(**vars)
end