Skip to content

feat: \ref/\cite/\label autocomplete#40

Merged
Oaklight merged 1 commit into
masterfrom
feature/label-cite-autocomplete
May 25, 2026
Merged

feat: \ref/\cite/\label autocomplete#40
Oaklight merged 1 commit into
masterfrom
feature/label-cite-autocomplete

Conversation

@Oaklight
Copy link
Copy Markdown
Owner

Summary

  • Add GET /api/projects/{name}/symbols endpoint that scans .tex files for \label{} and .bib files for BibTeX keys
  • Returns labels with file/line/context, citations with title/author/year metadata
  • Frontend autocomplete (already in app.js from refactoring) triggers inside \ref{}, \eqref{}, \autoref{}, \cite{}, \citet{}, \citep{}, etc.
  • Symbol cache refreshes automatically on .tex/.bib file save

Test plan

  • Symbols API returns correct data (19 labels for test project)
  • Typing \ref{ triggers autocomplete popup with all project labels
  • Each completion shows label key + source file + line number
  • Zero console errors throughout session

Closes #18

Add backend API endpoint GET /api/projects/{name}/symbols that scans
all .tex files for \label{} definitions and .bib files for BibTeX
entry keys with metadata (title, author, year).

Frontend (already committed in refactoring) wires CodeMirror
autocomplete to trigger inside \ref{}, \eqref{}, \autoref{},
\cite{}, \citet{}, \citep{}, etc., showing label/key with source
file context. Symbol cache refreshes on save of .tex/.bib files.

Closes #18
@Oaklight Oaklight merged commit 8adbb2c into master May 25, 2026
2 checks passed
@Oaklight Oaklight deleted the feature/label-cite-autocomplete branch May 25, 2026 20:44
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.

\ref / \cite / \label autocomplete

1 participant