Skip to content

Complete Antora xref targets and fragments#82

Merged
bbatsov merged 2 commits into
masterfrom
antora-xref-completion
Jun 5, 2026
Merged

Complete Antora xref targets and fragments#82
bbatsov merged 2 commits into
masterfrom
antora-xref-completion

Conversation

@bbatsov

@bbatsov bbatsov commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Phase 2b of the Antora/xref work, on top of #81.

Inside an xref: in an Antora component, completion now helps you author the reference:

  • the target position offers the component's pages (e.g. topic/page.adoc), with pages in other modules prefixed module:, plus the in-buffer anchor/section ids (for same-page refs)
  • after a #, it offers the target page's section ids and anchors, read from the resolved page
  • a same-page xref:# completes against the current buffer

Dot-prefixed entries (editor lock files, hidden dirs) are filtered out, and outside an Antora component the xref: completion falls through to the existing in-buffer behavior. Verified against cider/doc.

Next: project-wide xref-find-references (Phase 2c), then paste-image.

  • The commits are consistent with our contribution guidelines
  • You've added tests (if possible) to cover your change(s)
  • All tests are passing (eldev test)
  • The new code is not generating bytecode or M-x checkdoc warnings
  • You've updated the changelog (if adding/changing user-visible functionality)
  • You've updated the readme (if adding/changing user-visible functionality)

bbatsov added 2 commits June 5, 2026 15:08
Inside an xref: in an Antora component, completion now offers the
component's pages as targets (pages in other modules prefixed with
module:), and after a # it offers the target page's section ids and
anchors (read from the resolved page). A same-page xref:# completes
against the current buffer. Dot-prefixed entries (lock files, hidden
dirs) are skipped, and the page list falls through to the in-buffer xref
completion outside Antora.

Phase 2b of the Antora/xref work; project-wide find-references is next.
@bbatsov bbatsov merged commit 719c709 into master Jun 5, 2026
8 checks passed
@bbatsov bbatsov deleted the antora-xref-completion branch June 5, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant