tift for Visual Studio Code
Native LaTeX and BibTeX formatting with tift. The first release bundles tift 0.2.4 for Windows x64, Linux x64 (glibc), macOS Intel, and Apple Silicon. It requires VS Code 1.110 or later and works alongside LaTeX Workshop.
Download the VSIX for your platform from GitHub Releases and run Extensions: Install from VSIX…. Open a .tex or .bib file, run Format Document With… → Configure Default Formatter, and select tift. To format on save, enable editor.formatOnSave for [latex] or [bibtex].
Use Format Selection to format selected lines in the context of the whole document. Tift: Show Effective Configuration displays the configuration sources and overrides for the active file. Tift: Check Current Document checks unsaved edits; Tift: Check Workspace Formatting checks saved buffers with their individual settings without changing files. Tift: Clear Formatting Cache removes inactive cached results while retaining active entries.
Named files use their real path for tift.toml, filename overrides and % !TEX root resolution. Untitled LaTeX and BibTeX buffers use a .tex or .bib identity in the single open folder; in a multi-root window, save the buffer under its intended folder to apply project rules. Other project files and configuration are read from disk. The extension requires a trusted desktop workspace.
Settings
| Setting |
Default |
Purpose |
tift.executablePath |
Empty |
Absolute path to a custom executable. Empty uses the pre-installed tift from PATH, then the bundled runtime. |
tift.showFormatTime |
true |
Show successful formatting time briefly as green tift 24 ms; errors and cache results use the status bar and open the Tift output on click. |
tift.trace |
false |
Pass --trace and record formatting stages in the Tift output channel. |
tift.format.indentStyle, tift.format.indentWidth |
spaces, 2 |
Fallback indentation preferences. |
tift.format.wrapMode, tift.format.wrapColumns |
preserve, 88 |
Fallback prose line wrapping preferences. |
tift.format.alignTables |
true |
Fallback table and aligned-equation alignment. |
tift.format.addStructuralBreaks, tift.format.wrapComments |
true, false |
Fallback structural breaks and comment wrapping. |
tift.format.normalizeBibtex, tift.format.bibtexNameCase |
true, preserve |
Fallback BibTeX field layout and name casing. |
tift.format.normalizeMathSpacing |
true |
Fallback formula whitespace normalization. |
tift.format.finalNewline |
always |
Fallback final newline behavior. |
Each preference falls back by individual TOML key: project config, global tift.toml, project extension settings, then user extension settings. Settings with no project value fall through to the selected scope; explicit false values remain in effect. tift.format.* settings support workspace and user scopes.
LaTeX Workshop can remain installed for compiling and previewing documents. Its build tools are independent of this extension's formatter.
Development and releases
With Node.js 24 and curl installed, run npm ci and node scripts/bundle-tift.mjs --target <platform> on the matching host. Targets are win32-x64, linux-x64, darwin-x64, and darwin-arm64. Run npm test for the formatter bridge and node scripts/editor-test.cjs for VS Code integration (use xvfb-run -a on headless Linux). Package with npx vsce package --no-dependencies --target <platform>.
The v* release workflow builds four platform-qualified VSIX packages and attaches them to the GitHub release. It also publishes them to the Visual Studio Marketplace when the marketplace environment has a VSCE_PAT secret for the manifest's publisher.