coc-toml
kkiyama117toml extension for coc.nvim
Published Package Summary
coc-toml
TOML language server extension for coc.nvim.
Powered by Tombi.
Breaking Changes in v2.0
v2.0 is a complete rewrite with the following breaking changes:
Language Server: Taplo → Tombi
The underlying language server has been replaced from Taplo to Tombi. Tombi runs as a native binary (tombi lsp) — WASM is no longer used.
The tombi binary is automatically downloaded when the extension activates. You can also specify a custom path via tombi.path setting.
Install
Prerequisites
- coc.nvim >= 0.0.82
:CocInstall coc-toml
Or via plugin manager (e.g., dein.vim):
[[plugins]]
repo = 'kkiyama117/coc-toml'
depends = 'coc.nvim'
Features
- Formatting and linting for TOML files
- Completion with schema validation
- Go-to-definition and hover
- Diagnostics
- Schema association
Develop
pnpm install --frozen-lockfile
pnpm build
Testing
Smoke tests run inside a container so they are reproducible across
hosts. Both Docker and Podman work — the pnpm docker:* scripts use
the docker CLI name, and Podman ships a docker alias by default.
# Build the image and run every scenario (build check + all fixtures).
pnpm test
# Or step through pieces:
pnpm docker:build # build the test image
pnpm docker:test # build artifact + tombi binary check
pnpm docker:test:all # all scenarios
# Interactive shell / nvim inside the image:
pnpm docker:shell
pnpm docker:nvim
A docker/compose.yaml is also provided for docker compose /
podman compose users — see pnpm compose:test, compose:test:all,
compose:shell, and compose:nvim.
License
MIT.
Dependencies
- toml extension for coc.nvim
- onLanguage:toml
- onLanguage:cargoLock
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions or repository releases for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-toml@2.1.0.
| Command (:CocCommand) | Description |
|---|---|
| tombi.refreshCache | Tombi: Refresh Cache |
| tombi.selectSchema | Tombi: Select Schema |
| tombi.showLanguageServerVersion | Tombi: Show Language Server Version |
| tombi.restartLanguageServer | Tombi: Restart Language Server |
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "object",
"default": {},
"description": "Environment variables passed to the tombi process.",
"patternProperties": {
"^.+$": {
"type": "string"
}
}
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Additional arguments passed to the tombi lsp command."
}Raw JSON Schema
{
"type": [
"string",
"null"
],
"default": null,
"description": "Absolute path to the tombi executable. If not set, searches PATH."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Whether to enable the tombi extension."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "object",
"required": [
"uri",
"fileMatch"
],
"properties": {
"uri": {
"type": "string",
"description": "Schema URI (http(s):// or file://)."
},
"title": {
"type": "string",
"description": "Optional display title for the schema."
},
"fileMatch": {
"type": "array",
"items": {
"type": "string"
},
"description": "Glob patterns the schema applies to (e.g. [\"Cargo.toml\"], [\"pyproject.toml\"])."
},
"description": {
"type": "string",
"description": "Optional description shown alongside the schema."
},
"tomlVersion": {
"type": "string",
"description": "TOML version to use with this schema (e.g. \"v1.0.0\" or \"v1.1.0\")."
}
}
},
"default": [],
"description": "Associate JSON schemas with TOML files. Each entry is registered with the language server on startup via tombi/associateSchema. For project-wide config, prefer tombi.toml in the workspace root."
}Raw JSON Schema
{
"enum": [
"v1.0.0",
"v1.1.0"
],
"type": "string",
"default": "v1.1.0",
"description": "Default TOML specification version used by the language server when neither a schema directive, comment directive, nor tombi.toml specifies one. Sent to Tombi via workspace/didChangeConfiguration as `toml-version`."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Prompt before downloading updates. If false, downloads automatically."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "Check for tombi updates on startup."
}