title: How to write the wrapper function geom_sf_label_repel()?
body: <p>I saw a <a href="https://github.com/slowkow/ggrepel/issues/111" rel="nofollow noreferrer">feature request</a> a couple of years ago about adding a <code>geom_sf_label_repel()</code> function based on the  <code>ggplot2</code> and <code>ggrepel</code> libraries. The same feature is also mentioned <a href="https://yutani.rbind.io/post/geom-sf-text-and-geom-sf-label-are-coming/" rel="nofollow noreferrer">this blog</a>. Quoting the blog:</p>
  <blockquote>
  <p>here's a preliminary version of geom_sf_label_repel()</p>
  </blockquote>
  <pre><code>ggplot(nc) +
    geom_sf() +
    ggrepel::geom_label_repel(
      data = nc[c(1:3, 10:14), ],
      aes(label = NAME, geometry = geometry),
      stat = &quot;sf_coordinates&quot;,
      min.segment.length = 0,
      colour = &quot;magenta&quot;,
      segment.colour = &quot;magenta&quot;
    )
  </code></pre>
  <p>No one has actually finished the wrapper function (probably because it is easy). But I know very little about the inner workings of ggplot/ggrepel functions.</p>
  <p><em>Could someone with the knowledge please explain how to convert the above into a reusable function (maybe called <code>geom_sf_label_repel</code>)?</em></p>