Settings
This extension contributes the settings below.
You can edit them from the VS Code Settings UI or directly in settings.json.
Preview
| Name | Description | Default |
|---|---|---|
|
Asciidoctor attributes used in the preview (object of |
|
|
Interval in milliseconds between two consecutive preview updates. The value |
|
|
Built-in stylesheet used when |
`` (Automatic) |
|
A URL or local path to a CSS stylesheet that replaces the default preview stylesheet. When left empty, the preview falls back to the document’s |
|
|
A list of URLs or local paths to CSS stylesheets layered on top of the preview style (default or custom), in order, so they keep the defaults and take precedence. |
|
|
Deprecated. Use |
|
|
Font family used in the preview. |
|
|
Font size, in pixels, used in the preview. |
|
|
Line height used in the preview. |
|
|
When the preview is scrolled, update the editor view. |
|
|
When the editor is scrolled, update the preview view. |
|
|
Mark the current editor selection in the preview. |
|
|
Double-click in the preview to switch to the editor. |
|
|
Keep the preview in memory while it is hidden so it reloads faster, at the cost of increased memory use. |
|
|
How links to other AsciiDoc files open in the preview. Possible values: |
|
| Name | Description | Default |
|---|---|---|
|
PDF engine used to export as PDF. Possible values: |
|
|
External |
|
|
List of arguments, for instance |
|
|
External |
|
|
List of arguments, for instance |
|
|
Directory where the exported PDF is written. When empty, the PDF is saved next to the document. A relative path is resolved against the workspace folder (or the document directory when there is no workspace); |
|
|
Ask for the output location every time a PDF is exported. When disabled, the PDF is written directly to |
|
Extensions
| Name | Description | Default |
|---|---|---|
|
Enable the Kroki extension to generate diagrams. |
|
|
URL of the Kroki server used to render diagrams (for example |
(empty) |
|
Enable registration of Asciidoctor.js extensions from the workspace directory |
|
General
| Name | Description | Default |
|---|---|---|
|
(deprecated) Resolve relative includes and images against the workspace root instead of the current file’s directory. See Base directory resolution. |
|
Base directory resolution
By default, Asciidoctor resolves the relative paths in a document (include::, image::, link:, …) against the directory of the current file.
Enabling asciidoc.useWorkspaceRootAsBaseDirectory sets Asciidoctor’s base directory to the root of the workspace folder that contains the document instead.
This is useful when several documents, spread across different folders, all reference a shared folder (for example docs/_includes/) with the same path.
The setting is applied consistently to the preview, the HTML/DocBook export and the PDF export, so a document resolves the same way everywhere.
|
When the setting is enabled, Asciidoctor ties the intrinsic
Leaving the setting disabled (the default) is recommended: an explicit base directory is a known footgun that can break relative includes. |
|
This setting is deprecated and will be removed in a future release.
Use an |
Editor defaults
Besides the asciidoc. settings above, the extension also sets a few *VS Code editor defaults for AsciiDoc files through the configurationDefaults contribution point:
"[asciidoc]": {
"editor.wordWrap": "on",
"editor.wordBasedSuggestions": "off",
"editor.quickSuggestions": {
"comments": "off",
"strings": "off",
"other": "off"
}
}
Word wrap is on because AsciiDoc is a prose format.
The two suggestion settings are off on purpose: word-based suggestions (the editor proposing other words already present in the document) and the automatic suggestion pop-up add noise while you type structured constructs such as attribute references {name}, attribute entries :name: or cross references, where the extension already provides its own, context-aware completion.
Overriding these defaults
These are only defaults: you can override any of them in your own settings.json.
For example, to get the editor to suggest words from the document while writing prose:
"[asciidoc]": {
"editor.wordBasedSuggestions": "matchingDocuments",
"editor.quickSuggestions": {
"other": "on"
}
}
|
Scope your override under In practice this means changing a setting from the Settings UI search box (for example toggling Editor: Word Wrap) has no effect on AsciiDoc files: VS Code writes a non-language-specific value there, which the
|
|
When you work over Remote-SSH, in a dev container or over WSL, the extension runs on the remote machine and so do its defaults.
Put the |
Debug
| Name | Description | Default |
|---|---|---|
|
Provide error diagnostics. |
|
The extension writes its logs to a dedicated Asciidoctor output channel. See Get help → Logs to learn how to view them and change their verbosity.
|
The |