Tinymist Docs

VS Code Extension Configurations

HTML | Markdown

tinymist.compileStatustinymist.compileStatus

In VSCode, enable compile status meaning that the extension will show the compilation status in the status bar. Since Neovim and Helix don’t have a such feature, it is disabled by default at the language server label.

  • Type: stringstring
  • Valid Values:

    • "enable""enable"
    • "disable""disable"
  • Default: "enable""enable"

tinymist.completion.postfixtinymist.completion.postfix

Whether to enable postfix code completion. For example, [A].box|[A].box| will be completed to box[A]|box[A]|. Hint: Restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: truetrue

tinymist.completion.postfixUfcstinymist.completion.postfixUfcs

Whether to enable UFCS-style completion. For example, [A].box|[A].box| will be completed to box[A]|box[A]|. Hint: Restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: truetrue

tinymist.completion.postfixUfcsLefttinymist.completion.postfixUfcsLeft

Whether to enable left-variant UFCS-style completion. For example, [A].table|[A].table| will be completed to table(|)[A]table(|)[A]. Hint: Restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: truetrue

tinymist.completion.postfixUfcsRighttinymist.completion.postfixUfcsRight

Whether to enable right-variant UFCS-style completion. For example, [A].table|[A].table| will be completed to table([A], |)table([A], |). Hint: Restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: truetrue

tinymist.completion.symboltinymist.completion.symbol

Whether to make symbol completion stepless. For example, $ar|$$ar|$ will be completed to $arrow.r$$arrow.r$. Hint: Restarting the editor is required to change this setting.

  • Type: stringstring
  • Valid Values:

    • "step""step" : Complete symbols step by step
    • "stepless""stepless" : Complete symbols steplessly
  • Default: "step""step"

tinymist.completion.triggerOnSnippetPlaceholderstinymist.completion.triggerOnSnippetPlaceholders

Whether to trigger completions on arguments (placeholders) of snippets. For example, boxbox will be completed to box(|)box(|), and server will request the editor (lsp client) to request completion after moving cursor to the placeholder in the snippet. Note: this has no effect if the editor doesn’t support editor.action.triggerSuggesteditor.action.triggerSuggest or tinymist.triggerSuggestAndParameterHintstinymist.triggerSuggestAndParameterHints command. Hint: Restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: falsefalse

tinymist.configureDefaultWordSeparatortinymist.configureDefaultWordSeparator

Whether to configure default word separators on startup

  • Type: stringstring
  • Valid Values:

    • "enable""enable" : Override the default word separators on startup
    • "disable""disable" : Do not override the default word separators on startup
  • Default: "disable""disable"

tinymist.copyAndPastetinymist.copyAndPaste

Whether to handle paste of resources into the editing typst document. Note: restarting the editor is required to change this setting.

  • Type: stringstring
  • Valid Values:

    • "enable""enable" : Enable copy-and-paste.
    • "disable""disable" : Disable copy-and-paste.
  • Default: "enable""enable"

tinymist.dragAndDroptinymist.dragAndDrop

Whether to handle drag-and-drop of resources into the editing typst document. Note: restarting the editor is required to change this setting.

  • Type: stringstring
  • Valid Values:

    • "enable""enable" : Enable drag-and-drop.
    • "disable""disable" : Disable drag-and-drop.
  • Default: "enable""enable"

tinymist.exportPdftinymist.exportPdf

The extension can export PDFs of your Typst files. This setting controls whether this feature is enabled and how often it runs.

  • Type: stringstring
  • Valid Values:

    • "never""never" : Never export PDFs, you will manually run typst.
    • "onSave""onSave" : Export PDFs when you save a file.
    • "onType""onType" : Export PDFs as you type in a file.
    • "onDocumentHasTitle""onDocumentHasTitle" : (Deprecated) Export PDFs when a document has a title (and save a file), which is useful to filter out template files.
  • Default: "never""never"

tinymist.exportTargettinymist.exportTarget

The target to export the document to. Defaults to pagedpaged. Note: you can still export PDF when it is set to htmlhtml. This configuration only affects how the language server completes your code.

  • Type: stringstring
  • Valid Values:

    • "paged""paged" : The current export target is for PDF, PNG, and SVG export.
    • "html""html" : The current export target is for HTML export.
  • Default: "paged""paged"

tinymist.fontPathstinymist.fontPaths

A list of file or directory path to fonts. Note: The configuration source in higher priority will override the configuration source in lower priority. The order of precedence is: Configuration tinymist.fontPathstinymist.fontPaths > Configuration tinymist.typstExtraArgs.fontPathstinymist.typstExtraArgs.fontPaths > LSP’s CLI Argument --font-path--font-path > The environment variable TYPST_FONT_PATHSTYPST_FONT_PATHS (a path list separated by ;; (on Windows) or :: (Otherwise)). Note: If the path to fonts is a relative path, it will be resolved based on the root directory. Note: In VSCode, you can use VSCode variables in the path, e.g. ${workspaceFolder}/fonts${workspaceFolder}/fonts.

  • Type: array | null

tinymist.formatterIndentSizetinymist.formatterIndentSize

Sets the indent size (using space) for the formatter.

  • Type: numbernumber
  • Default: 22

tinymist.formatterModetinymist.formatterMode

The extension can format Typst files using typstfmt or typstyle.

  • Type: stringstring
  • Valid Values:

    • "disable""disable" : Formatter is not activated.
    • "typstyle""typstyle" : Use typstyle formatter.
    • "typstfmt""typstfmt" : Use typstfmt formatter.
  • Default: "typstyle""typstyle"

tinymist.formatterPrintWidthtinymist.formatterPrintWidth

Sets the print width for the formatter, which is a soft limit of characters per line. See the definition of Print Width. Note: this has lower priority than the formatter’s specific configurations.

  • Type: numbernumber
  • Default: 120120

tinymist.formatterProseWraptinymist.formatterProseWrap

Controls how the formatter handles prose line wrapping. If enabled, the formatter will insert hard line breaks at the specified print width. If disabled, the formatter keeps the original line breaks and spaces.

  • Type: booleanboolean
  • Default: falsefalse

tinymist.lint.enabledtinymist.lint.enabled

Enable or disable lint checks. Note: restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: falsefalse

tinymist.lint.whentinymist.lint.when

Configure when to perform lint checks. Note: restarting the editor is required to change this setting.

  • Type: stringstring
  • Valid Values:

    • "onSave""onSave" : Perform lint checks on save
    • "onType""onType" : Perform lint checks on type
  • Default: "onSave""onSave"

tinymist.onEnterEventtinymist.onEnterEvent

Enable or disable experimental/onEnter (LSP onEnter feature) to allow automatic insertion of characters on enter, such as ////// for comments. Note: restarting the editor is required to change this setting.

  • Type: booleanboolean
  • Default: truetrue

tinymist.outputPathtinymist.outputPath

The path pattern to store Typst artifacts, you can use $root$root or $dir$dir or $name$name to do magic configuration, e.g. $dir/$name$dir/$name (default) and $root/target/$dir/$name$root/target/$dir/$name.

  • Type: stringstring
  • Default: """"

tinymist.preview.background.argstinymist.preview.background.args

The arguments that the background preview server used for. It is only used when `tinymist.preview.background` is enabled. Check `tinymist preview` to see the allowed arguments.

  • Type: arrayarray
  • Properties:

    • "type""type":

      • Type: stringstring
  • Default: [
    "--data-plane-host=127.0.0.1:23635",
    "--invert-colors=auto"
    ]
    [
    "--data-plane-host=127.0.0.1:23635",
    "--invert-colors=auto"
    ]

tinymist.preview.background.enabledtinymist.preview.background.enabled

This configuration is only used for the editors that doesn't support lsp well, e.g. helix and zed. When it is enabled, the preview server listens a specific tcp port in the background. You can discover the background previewers in the preview panel.

  • Type: booleanboolean
  • Default: falsefalse

tinymist.preview.browsing.argstinymist.preview.browsing.args

The arguments used by `tinymist.startDefaultPreview` command. Check `tinymist preview` to see the allowed arguments.

  • Type: arrayarray
  • Properties:

    • "type""type":

      • Type: stringstring
  • Default: [
    "--data-plane-host=127.0.0.1:0",
    "--invert-colors=auto",
    "--open"
    ]
    [
    "--data-plane-host=127.0.0.1:0",
    "--invert-colors=auto",
    "--open"
    ]

tinymist.preview.cursorIndicatortinymist.preview.cursorIndicator

(Experimental) Show typst cursor indicator in preview.

  • Type: booleanboolean
  • Default: falsefalse

tinymist.preview.invertColorstinymist.preview.invertColors

Invert colors of the preview (useful for dark themes without cost). Please note you could see the origin colors when you hover elements in the preview. It is also possible to specify strategy to each element kind by an object map in JSON format.

This configuration item can be one of following types:

  • Invert colors of the preview.

    • Type: stringstring
    • Valid Values:

      • "never""never" : Never
      • "auto""auto" : Inferring from the browser settings
      • "always""always" : Always
    • Default: "never""never"
  • Invert colors of the preview in a more fine-grained way.

    • Type: objectobject
    • Properties:

      • "rest""rest": Invert colors of the rest of the elements.

        • Type: stringstring
        • Valid Values:

          • "never""never" : Never
          • "auto""auto" : Inferring from the browser settings
          • "always""always" : Always
        • Default: "never""never"
      • "image""image": Invert colors of the images.

        • Type: stringstring
        • Valid Values:

          • "never""never" : Never
          • "auto""auto" : Inferring from the browser settings
          • "always""always" : Always
        • Default: "never""never"
    • Default: {}{}

tinymist.preview.partialRenderingtinymist.preview.partialRendering

Only render visible part of the document. This can improve performance but still being experimental.

  • Type: booleanboolean
  • Default: truetrue

tinymist.preview.refreshtinymist.preview.refresh

Refresh preview when the document is saved or when the document is changed

  • Type: stringstring
  • Valid Values:

    • "onSave""onSave" : Refresh preview on save
    • "onType""onType" : Refresh preview on type
  • Default: "onType""onType"

tinymist.preview.scrollSynctinymist.preview.scrollSync

Configure scroll sync mode.

  • Type: stringstring
  • Valid Values:

    • "never""never" : Disable automatic scroll sync
    • "onSelectionChangeByMouse""onSelectionChangeByMouse" : Scroll preview to current cursor position when selection changes by mouse
    • "onSelectionChange""onSelectionChange" : Scroll preview to current cursor position when selection changes by mouse or keyboard (any source)
  • Default: "onSelectionChangeByMouse""onSelectionChangeByMouse"

tinymist.previewFeaturetinymist.previewFeature

Enable or disable preview features of Typst. Note: restarting the editor is required to change this setting.

  • Type: stringstring
  • Valid Values:

    • "enable""enable" : Enable preview features.
    • "disable""disable" : Disable preview features.
  • Default: "enable""enable"

tinymist.projectResolutiontinymist.projectResolution

This configuration specifies the way to resolved projects.

  • Type: stringstring
  • Valid Values:

    • "singleFile""singleFile" : Manage typst documents like what we did in Markdown. Each single file is an individual document and no project resolution is needed.
    • "lockDatabase""lockDatabase" : Manage typst documents like what we did in Rust. For each workspace, tinymist tracks your preview and compilation history, and stores the information in a lock file. Tinymist will automatically selects the main file to use according to the lock file. This also allows other tools push preview and export tasks to language server by updating the lock file.
  • Default: "singleFile""singleFile"

tinymist.renderDocstinymist.renderDocs

(Experimental) Whether to render typst elements in (hover) docs. In VS Code, when this feature is enabled, tinymist will store rendered results in the filesystem’s temporary storage to show them in the hover content. Note: Please disable this feature if the editor doesn’t support/handle image previewing in docs.

  • Type: stringstring
  • Valid Values:

    • "enable""enable" : Enable render docs.
    • "disable""disable" : Disable render docs.
  • Default: "enable""enable"

tinymist.rootPathtinymist.rootPath

Configure the root for absolute paths in typst. Hint: you can set the rootPath to --, so that tinymist will always use parent directory of the file as the root path. Note: for Neovim users, if it complains root not found, you must set require("lspconfig")["tinymist"].setup { root_dir }require("lspconfig")["tinymist"].setup { root_dir } as well, see tinymist#528.

  • Type: string | null

tinymist.semanticTokenstinymist.semanticTokens

Enable or disable semantic tokens (LSP syntax highlighting)

  • Type: stringstring
  • Valid Values:

    • "enable""enable" : Use semantic tokens for syntax highlighting
    • "disable""disable" : Do not use semantic tokens for syntax highlighting
  • Default: "enable""enable"

tinymist.serverPathtinymist.serverPath

The extension can use a local tinymist executable instead of the one bundled with the extension. This setting controls the path to the executable. The string “tinymist” means look up Tinymist in PATH.

  • Type: string | null

tinymist.showExportFileIntinymist.showExportFileIn

Configures way of opening exported files, e.g. inside of editor tabs or using system application.

This configuration item can be one of following types:

  • Configures way of opening exported files, e.g. inside of editor tabs or using system application.

    • Type: stringstring
    • Valid Values:

      • "editorTab""editorTab" : Show the exported files in editor tabs.
      • "systemDefault""systemDefault" : Show the exported files by system default application.
    • Default: "editorTab""editorTab"

tinymist.statusBarFormattinymist.statusBarFormat

Set format string of the server status. For example, {compileStatusIcon}{wordCount} [{fileName}]{compileStatusIcon}{wordCount} [{fileName}] will format the status as $(check) 123 words [main]$(check) 123 words [main]. Valid placeholders are:

  • {compileStatusIcon}{compileStatusIcon}: Icon indicating the compile status
  • {wordCount}{wordCount}: Number of words in the document
  • {fileName}{fileName}: Name of the file being compiled

Note: The status bar will be hidden if the format string is empty.

  • Type: stringstring
  • Default: "{compileStatusIcon} {wordCount} [{fileName}]""{compileStatusIcon} {wordCount} [{fileName}]"

tinymist.systemFontstinymist.systemFonts

A flag that determines whether to load system fonts for Typst compiler, which is useful for ensuring reproducible compilation. If set to null or not set, the extension will use the default behavior of the Typst compiler. Note: You need to restart LSP to change this options.

  • Type: booleanboolean
  • Default: truetrue

tinymist.trace.servertinymist.trace.server

Traces the communication between VS Code and the language server.

  • Type: stringstring
  • Valid Values:

    • "off""off"
    • "messages""messages"
    • "verbose""verbose"
  • Default: "off""off"

tinymist.typingContinueCommentsOnNewlinetinymist.typingContinueCommentsOnNewline

Whether to prefix newlines after comments with the corresponding comment prefix.

  • Type: booleanboolean
  • Default: truetrue

tinymist.typstExtraArgstinymist.typstExtraArgs

You can pass any arguments as you like, and we will try to follow behaviors of the same version of typst-cli. Note: the arguments may be overridden by other settings. For example, --font-path--font-path will be overridden by tinymist.fontPathstinymist.fontPaths.

  • Type: arrayarray
  • Default: [][]