This package provides:
This package consumes:
Made for Pulsar!
This package was written specifically for Pulsar and did not exist in the Atom package repository.
Compile Typst documents with build tools, compile-on-save, and PDF viewer integration. Includes linter diagnostics, multiple simultaneous builds, and a built-in Typst installer.
typst compiler with configurable output format.linter-indie. With linter-bundle, errors display clickable references to source locations.To install typst-tools search for typst-tools in the Install pane of the Pulsar settings or run ppm install typst-tools. Alternatively, you can run ppm install asiloisad/pulsar-typst-tools to install a package directly from the GitHub repository.
This package requires the typst binary. You can install it in several ways:
Via the package:
Run the Typst Tools: Install Typst command from the command palette. This downloads the latest Typst release from GitHub and places the binary in the package's bin/ directory.
Manual installation:
winget install --id Typst.Typst or download from typst/typst releasesbrew install typstcargo install typst-cli or download from typst/typst releasesAfter installation, verify that typst is available:
typst --version
If typst is not in your PATH, set the full path in the package settings under Path to Typst.
Commands available in atom-workspace:
typst-tools:install-typst: download and install the Typst binary from GitHub releases.Commands available in atom-text-editor[data-grammar~="typst"]:
typst-tools:compile: F5 compile the current Typst document,typst-tools:watch: Alt+F5 toggle compile-on-save mode for the current file,typst-tools:interrupt: Ctrl+F5 stop the current build process for the active file,typst-tools:interrupt-all: Ctrl+F6 stop all running build processes,typst-tools:clean-linter: F6 clear all linter messages,typst-tools:open-pdf: F7 open the generated PDF in Pulsar,typst-tools:list-fonts: list all fonts available to Typst.The status bar item shows the current build state with a live timer:
Mouse interactions:
| Action | Effect |
|---|---|
| Left click | Compile |
| Alt + Left click | Toggle compile-on-save |
| Middle click | Split PDF / Typst source |
| Right click | Interrupt build and clear linter |
This package works seamlessly with the pdf-viewer package:
The package supports compiling multiple Typst files simultaneously. Each file tracks its own build state independently, allowing you to start a compilation in one file while another is still building. The status bar updates to show the build state of the currently active file.
typst-toolsAllows other packages to integrate with Typst compilation. Subscribe to build events, query build status, and control compilation.
In your package.json:
{
"consumedServices": {
"typst-tools": {
"versions": {
"1.0.0": "consumeTypstTools"
}
}
}
}
In your main module:
consumeTypstTools(service) {
// Subscribe to build events
this.subscriptions.add(
service.onDidStartBuild(({ file }) => {
console.log(`Build started: ${file}`);
}),
service.onDidFinishBuild(({ file, output }) => {
console.log(`Build finished: ${file}`);
}),
service.onDidFailBuild(({ file, error, output }) => {
console.log(`Build failed: ${file}`, error);
}),
service.onDidChangeBuildStatus(({ status, file, error }) => {
console.log(`Build status changed: ${status}`);
})
);
// Get current status for a specific file
const { status, file } = service.getStatus(filePath);
// Check if a specific file is currently building
const building = service.isBuilding(filePath);
}
| Method | Description |
|---|---|
onDidStartBuild(callback) |
Called when a build starts. Callback receives { file }. |
onDidFinishBuild(callback) |
Called when a build succeeds. Callback receives { file, output }. |
onDidFailBuild(callback) |
Called when a build fails. Callback receives { file, error, output }. |
onDidChangeBuildStatus(callback) |
Called on any status change. Callback receives { status, file, error? }. |
getStatus(filePath?) |
Returns status for a specific file or all builds if no path provided. |
isBuilding(filePath) |
Returns true if the specified file is currently being compiled. |
compile(filePath) |
Trigger compilation for the given file. |
interrupt(filePath) |
Interrupt the build for the given file. |
interruptAll() |
Interrupt all running builds. |
toggleCompileOnSave() |
Toggle compile-on-save mode for the active editor. |
isCompileOnSaveEnabled(filePath) |
Returns true if compile-on-save is active for the file. |
'idle': No build in progress'building': Build is currently running'success': Last build completed successfully'error': Last build failedGot ideas to make this package better, found a bug, or want to help add new features? Just drop your thoughts on GitHub. Any feedback is welcome!