Editing tools
Code intelligence
IDE-grade navigation for LaTeX and Typst: go to definition, find references, project-wide rename, hover cards, math preview, the document outline, and Typst signature help and formatting.
Esta página aún no está disponible en tu idioma.
Oleafly indexes the whole project, including every \label, citation key, custom macro, theorem, glossary entry, and the \input graph connecting your files. That index powers navigation across files. Typst files use the same shortcuts, answered by Typst’s language server; see Typst files below.
Shortcuts show macOS keys. On Windows and Linux, read ⌘ as Ctrl.
Go to definition: F12 or ⌘-click
Section titled “Go to definition: F12 or ⌘-click”Put the cursor on a \ref, a \cite key, a custom macro, a \begin{env} for an environment you defined, or a glossary term, and press F12 (or hold ⌘ and click it). The editor jumps to where it’s defined, opening the defining file if it’s elsewhere in the project.
Pressing F12 while already on a definition flips to finding its references, the same convention IDEs use.
Find references: ⇧F12
Section titled “Find references: ⇧F12”Shift+F12 lists every use of the symbol in the References panel in the left rail: one row per occurrence with the file, line, and a preview, and a “def” badge on the definition itself. Click a row to jump. It’s the fastest way to answer “can I delete this label?” or “where did I cite this paper?”
Rename symbol: F2
Section titled “Rename symbol: F2”F2 renames a label, citation key, macro, theorem, glossary entry, or environment across the entire project in one step: the open file updates live, other files are rewritten on disk, and the index rebuilds. If the new name already exists, the rename is blocked before it can create a collision, and a toast reports how many edits landed in how many files.
Renaming fig:overview to fig:architecture and having all six \refs follow is a two-second operation.
With the cursor on a file path instead, such as the argument of \input or \includegraphics, F2 renames that file and updates the paths that point to it. The same works on #include and image() in Typst and on links and images in Markdown. See Paths follow a moved file.
Hover cards
Section titled “Hover cards”Hover any symbol and a card explains it:
- On a reference: the symbol kind, source preview, and location. After a successful LaTeX build, supported references also show the compiled number and page.
- On a definition: how many references it has across the project.
- On anything unresolved: a clear “Unresolved” label, which is your earliest warning of a typo’d
\refor a missing.bibentry.
Hold ⌘ (Ctrl) while hovering and clickable symbols underline like links, click to jump.
Math preview on hover
Section titled “Math preview on hover”Hover over inline $…$, \(…\), or display \[…\] math to render it with KaTeX without compiling. Display math uses display style. A broken expression shows its error.
The Outline panel
Section titled “The Outline panel”Below the file tree, the Outline panel shows your document’s structure: sections indented by level, plus \input includes, across all files. Items from other files carry a filename badge. Click anything to jump straight to it. For a thesis split across a dozen chapter files, this is the table of contents you navigate by.
Section titles show as plain text, so a color command, a font switch, or \nameref in a title doesn’t appear as raw LaTeX. Headings made by your own macros that wrap \section are listed, and headings inside a macro definition are not.
The panel divider between the tree and the outline drags to resize.
Where the toolbar and menu fit
Section titled “Where the toolbar and menu fit”All three navigation commands also live in the editor toolbar’s Code intelligence menu (the braces icon) and the right-click menu, so they’re discoverable before the shortcuts become muscle memory.
Typst files
Section titled “Typst files”In .typ files, Tinymist, Typst’s language server, answers most of these commands. Oleafly runs the Tinymist release that matches the project’s Typst version (see Typst projects).
- F12 or ⌘-click goes to the definition of a label, variable, or function, including one in another file.
- ⇧F12 lists every use in the References panel.
- F2 renames a label, variable, or function across the project.
- Hover a function to read its documentation. Hover a
@previewimport for a link to the package on Typst Universe.
The same three commands are in the Code intelligence menu on the Typst toolbar, the right-click menu, and the ⌘K palette. Labels in Typst and LaTeX files stay separate, so a label used in both is not reported twice and renaming one leaves the other alone.
Signature help and parameter hints
Section titled “Signature help and parameter hints”Type ( after a function name and a card shows its parameters, with the one you are typing highlighted. Esc closes it. To see parameter names written before each argument in function calls, turn on Parameter name hints in Settings → Appearance → Editor, under Typst.
Color values such as rgb("#1f77b4") get a small swatch beside them. ⌘-click a link or a file path in the source to open it.
Format a Typst file
Section titled “Format a Typst file”Format document tidies the whole file with typstyle. Press ⇧⌥F (Shift+Alt+F), right-click in the editor, or find it in the ⌘K palette. Format selection formats only the selected lines.
The Typst group in Settings → Appearance → Editor controls the formatter:
- Format on save formats a Typst file each time you press ⌘S (Ctrl+S). Autosave leaves the file alone. It is off by default.
- Formatter line width is where typstyle wraps long lines. The default is 120 characters.
- Formatter indent is the number of spaces per level. The default is 2.
- Typst lint checks looks for likely mistakes each time you save. Turning it on or off restarts the language server.
The AI sees the same index
Section titled “The AI sees the same index”The AI assistant has a project_map tool built on this same index: the outline, labels, citations, macros, file graph, and any unresolved references. When you ask it about “the methodology section,” it can actually find it.