coc-toml
v2.0.2
Published
toml extension for coc.nvim
Downloads
474
Readme
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.
Configuration namespace: toml.* → tombi.*
All settings have been renamed:
| v1.x (toml.*) | v2.0 (tombi.*) |
|---|---|
| toml.enabled | tombi.enabled |
| toml.activationStatus | (removed) |
| toml.taploConfig | (project-level tombi.toml instead now. global config will be implemented later) |
| toml.taploConfigEnabled | (removed) |
| toml.semanticTokens | (removed — handled by Tombi) |
| toml.formatter.* | (project-level tombi.toml instead. global config will be implemented later) |
| toml.schema.* | (project-level tombi.toml instead. global config will be implemented later) |
| (new) | tombi.path |
| (new) | tombi.args |
| (new) | tombi.env |
Commands renamed
| v1.x | v2.0 |
|---|---|
| toml.syntaxTree | (removed) |
| toml.downloadSchemas | tombi.refreshCache |
| toml.tomlToJson | (removed) |
| toml.jsonToToml | (removed) |
| (new) | tombi.selectSchema |
| (new) | tombi.showLanguageServerVersion |
| (new) | tombi.restartLanguageServer |
Schema configuration
Schemas are now configured in project-level tombi.toml or .tombi.toml files, not in coc-settings.json. See Tombi documentation for details.
Global config by coc-settings.json will be implemented later.
Install
Prerequisites
- coc.nvim >= 0.0.82
:CocInstall coc-tomlOr via plugin manager (e.g., dein.vim):
[[plugins]]
repo = 'kkiyama117/coc-toml'
depends = 'coc.nvim'Configuration
Add to your coc-settings.json (:CocConfig):
{
"tombi.enabled": true,
"tombi.path": null,
"tombi.args": [],
"tombi.env": {}
}| Setting | Description | Default |
|---|---|---|
| tombi.enabled | Enable the extension | true |
| tombi.path | Absolute path to the tombi executable. If not set, searches PATH. | null |
| tombi.args | Additional arguments passed to tombi lsp | [] |
| tombi.env | Environment variables passed to the tombi process | {} |
Formatter, linter, and schema settings are configured in project-level tombi.toml files, not in coc-settings.json.
Commands
| Command | Description |
|---|---|
| tombi.refreshCache | Refresh schema cache |
| tombi.selectSchema | Select schema for current file |
| tombi.showLanguageServerVersion | Show Tombi version |
| tombi.restartLanguageServer | Restart the language server |
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 buildLicense
MIT.
