VSCode Extension

Language Server Binary Priority

The tombi VSCode extension selects the Language Server binary in the following order of priority:

OrderSource TypeDescription
1editor settingsPath explicitly specified by tombi.path in .vscode/settings.json
2venvtombi binary found in a Python virtual environment (venv) in the workspace
3node_modulestombi binary found in the node_modules/.bin directory in the workspace
4localtombi binary found in the system PATH
5bundledtombi binary bundled with the extension

You can check which tombi binary is currently selected by running the Tombi: Show Language Server Version command from the VSCode command palette.

Select Schema

You can manually select and apply a JSON schema to the current TOML file using the Tombi: Select Schema command from the VSCode command palette. This command lists all available schemas and associates the selected one with the current file.

This is useful when working on projects without Tombi configuration, or when validating files whose paths don't match SchemaStore's fileMatch patterns (e.g., template files like config.toml.template or example files like example-config.toml). The selected schema takes precedence over catalog schemas and automatic associations.

Offline Mode

You can set offline mode in the VSCode settings file.

{
  "tombi.args": ["lsp", "--offline"]
}

Verbose Logging

You can enable verbose logging in the VSCode settings file.

  • Debug: -v
  • Trace: -vv
{
  "tombi.args": ["lsp", "-vv"]
}

Semantic Tokens for Strings and Comments

Tombi sends semantic tokens for strings and comments by default. Semantic tokens take priority over TextMate grammars and other extensions' highlighting, so highlighting injected into strings by another extension (e.g. shell syntax in a string) can be hidden. You can stop Tombi from sending them in the VSCode settings file.

{
  "tombi.semanticTokens.strings.enabled": false,
  "tombi.semanticTokens.comments.enabled": false
}

Both settings default to true. Restart the language server (Tombi: Restart Language Server) after changing them.

When comments are disabled, Tombi directives (#:tombi ..., # tombi: ...) and # region / # endregion markers keep their keyword highlighting.

Other editors can pass the same options as initializationOptions of the initialize request:

{
  "semanticTokens": {
    "strings": { "enabled": true },
    "comments": { "enabled": true }
  }
}

JSON Schema Association

As with Taplo, extensions can associate their own schemas using tomlValidation.

You can specify fileMatch, which associates the schema with documents whose file matches the given pattern (same as jsonValidation).

{
  "contributes": {
    "tomlValidation": [
      {
        "fileMatch": "^.*foo.toml$",
        "url": "https://www.schemastore.org/foo.json"
      }
    ]
  }
}