Repository navigation
Vscode
Static analysis for LaTeX and TeX documents, powered by SaTeX and its built-in language server (satex lsp): diagnostics, lints and navigation for .tex, .sty, .cls and .bib files.
The extension lives in editors/vscode/. Other editors: IntelliJ, and any LSP client through the language server.
- Starts
satex lspover stdio for LaTeX, TeX and BibTeX files, at a lower priority and with a memory limit (satex.server.maxMemory). - A satex view in the activity bar: the findings of the open documents by rule, most severe first, and the actions below.
- A status bar entry: what satex caches or analyzes (
caching pdftex kernel), then its errors and warnings. A click opens the view. The kernel cache is built once on first use. - Hovers are kept and answered at once, also while an edit is analyzed. The names a document uses most are prepared while satex is idle.
- With LaTeX Workshop installed, satex offers once to turn its chktex linting off, so a finding is not reported twice.
-
satex: Trace Expansion Here(satex.traceAtCursor): traces what the selection, or the control sequence at the cursor, expands to at that position and shows the steps beside the editor. -
satex: Compile(satex.compile): builds the root document, streams the build output to the "satex build" channel and shows the findings as diagnostics. - Widgets sit where you are. A code lens above each table, figure and plugin view says
Edit table…,Edit image…orEdit placement…. A tabular without rows has one too. The same entries are code actions (Ctrl+.) and hover links. A type plugin switches its lens off insatex.yaml(type_plugins).satex: Open Widget…lists them all.
satex uses your installed TeX distribution (kpsewhich, pdflatex, ...). TeX Live is not bundled, as it is far too large. Install TeX Live, MiKTeX or MacTeX yourself. The extension warns if kpsewhich or pdflatex is not on the PATH.
The platform-specific packages bundle the matching satex binary. The universal package does not. It uses satex from the PATH (cargo install satex-analyzer).
| Setting | Description |
|---|---|
satex.path |
Path to the satex binary. Empty: bundled binary, then satex on the PATH. User settings only. |
satex.statusBar.enabled |
Show satex in the status bar. |
satex.server.maxMemory |
Most memory one analysis may hold (2GiB). |
satex.server.maxCores |
CPU cores the server may use on Linux, through its cgroup (2, 0 for no cap). |
satex.server.niceness |
Scheduling priority of the server (10). Higher yields more to the editor. |
satex.server.cgroup |
On Linux, enforce the memory and core limits in a systemd user scope (true). |
satex.findings.whileAnalyzing |
What the Problems view shows while an analysis runs. hide (default): only findings no pass can change, the rest once the run ends, and the status bar says it runs. keep: the last complete findings. mark: those, saying they may change. |
satex.rootFile |
Root document, relative to the workspace folder. Empty: the active file. Used by the trace and compile commands. |
satex.trace.server |
off, messages or verbose: trace the language server communication. |
cargo vscode from the repository builds satex, bundles it and installs the extension (needs Rust, Node and VS Code's code). Then reload the VS Code window.
Or from editors/vscode:
-
npm run package:localbuilds the release binary (cargo build --release), bundles it underbin/<platform>-<arch>/, compiles and writessatex-local.vsix. -
npm run trydoes the same, then installs the VSIX withcode --install-extension --force.