LSP-tombi
TOML support for Sublime's LSP plugin provided through Tombi
Details
Installs
- Total 0
- Win 0
- Mac 0
- Linux 0
| Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | Sep 18 | Sep 17 | Sep 16 | Sep 15 | Sep 14 | Sep 13 | Sep 12 | Sep 11 | Sep 10 | Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
LSP-tombi
This is a helper package that starts the Tombi TOML language server for you.
Tombi gives formatting, linting, completion, hover and schema validation for all TOML files. It uses the JSON Schema Store catalog, so files like pyproject.toml, Cargo.toml and many others get schema support automatically.
Installation
The package downloads the tombi binary from GitHub releases when the server starts for the first time. If the workspace folder has a .venv with tombi installed (for example with uv add --dev tombi), the package uses that binary instead.
To use a different binary, change the command setting:
{
"command": ["/absolute/path/to/tombi", "lsp"],
}
Applicable files
This language server operates on views with the source.toml base scope.
Configuration
Open Preferences: LSP-tombi Settings from the Command Palette to edit the global settings.
Configure Tombi for your project in a tombi.toml, .tombi.toml or in the [tool.tombi] table of pyproject.toml. See the Tombi documentation for all options. When you save one of these files, the server loads the new configuration.
You can also give editor-level config in the settings.tombi object of the LSP-tombi settings. It uses the same keys as tombi.toml.
Formatting
Tombi supports formatting of the document.
- To format the file, run
LSP: Format Filefrom the Command Palette. - To format each time you save, set
"lsp_format_on_save": truein the LSP settings. To do this only for TOML files, add the setting to the syntax-specific settings (Preferences > Settings - Syntax Specific) of a TOML file.
Configure the formatter in the [format.rules] table of the Tombi config, for example indent-width or line-width. See the configuration documentation for all rules. Tombi does not use the tab_size and translate_tabs_to_spaces settings of Sublime Text.
By default, Tombi sorts table keys and array values in the order that the JSON Schema of the file gives (for example in Cargo.toml and pyproject.toml). To stop this, see Auto Sorting.
Semantic highlighting
Tombi gives semantic tokens for table names, keys, values and # tombi: comment directives. To use them, set "semantic_highlighting": true in the LSP settings. The semantic_tokens setting of LSP-tombi gives the scopes for the custom token types (table, key, boolean, offsetDateTime, localDateTime, localDate and localTime). The default scopes are the same as the scopes of the TOML syntax. To change a color, add a color scheme rule for meta.semantic-token.<token-type> (all lowercase), for example meta.semantic-token.table.
Commands
| Command palette entry | Description |
|---|---|
LSP-tombi: Select Schema |
Select a schema from the catalog and apply it to the current file. |
LSP-tombi: Refresh Cache |
Remove the cached schemas and catalogs, and fetch them again. |
LSP-tombi: Show Status |
Show the TOML version, the config file and the schema for the current file. |
Alternative to LSP-pyproject
LSP-pyproject operates only on pyproject.toml. Tombi operates on all TOML files, and it also validates pyproject.toml with its schema. If you install both packages, you get two sets of diagnostics for pyproject.toml. In that case, disable one of them.