Zed Extension

The Tombi extension currently published in Zed's extension registry focuses on Language Server Protocol (LSP) features. Syntax highlighting and other syntax-related editor features are provided by the TOML extension, which should be installed alongside the Tombi extension.

Language Server Binary Priority

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

OrderSource TypeDescription
1editor settingsPath explicitly specified by lsp.tombi.binary.path in Zed settings
2venvtombi binary found in a Python virtual environment (.venv/bin/tombi or .venv/Scripts/tombi.exe) in the workspace
3node_modulestombi binary found in the node_modules/.bin directory in the workspace
4localtombi binary found in the system PATH (via which tombi)
5cachedtombi binary cached in the current Zed process from a previous extension-managed resolution
6downloadedDownload the latest tombi binary from GitHub
7fallbackIf the download fails, use the newest already-downloaded extension-managed tombi binary

When the extension needs to manage the binary itself for the first time in a given Zed process, step 5 is skipped because no process-local cache exists yet. In that case, the extension attempts step 6 first and only falls back to step 7 if the download fails.

Configuration

You can configure the extension through Zed's LSP settings. For example, to specify custom arguments and environment variables:

{
  "lsp": {
    "tombi": {
      "binary": {
        "arguments": ["lsp", "-v"],
        "env": { "NO_COLOR": "true" }
      }
    }
  }
}

Format settings

If you cannot format your TOML files, please try to set the following settings.

{
  "lsp": {
    "tombi": {
      "binary": {
        "arguments": ["lsp", "-vv"],
        "env": { "NO_COLOR": "true" }
      }
    }
  }
}

Offline Mode

You can set offline mode in the Zed settings file.

{
  "lsp": {
    "tombi": {
      "binary": {
        "arguments": ["lsp", "--offline"]
      }
    }
  }
}

Troubleshooting

Zed v1.1.6 and later include a workaround for background type definition requests that could open unwanted lsp edit tabs. If you still encounter this behavior, you can temporarily disable Tombi's Go to Type Definition feature in tombi.toml:

[lsp]
goto-type-definition.enabled = false

For details and alternative workarounds, see #1556.