Type object
File match tombi.toml **/tombi/config.toml
Schema URL https://catalog.lintel.tools/schemas/schemastore/tombi/latest.json
Source https://www.schemastore.org/tombi.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Tombi (鳶 /toɴbi/) is a toolkit for TOML; providing a formatter/linter and language server. See the GitHub repository for more information.

Properties

toml-version TomlVersion | null

TOML version to use if not specified in the schema and comment directive.

Default: "v1.0.0"
files FilesOptions | null
format FormatOptions | null
lint LintOptions | null
lsp LspOptions | null
schema SchemaOverviewOptions | null
schemas array | null
overrides array | null
extensions Extensions | null

Definitions

TomlVersion string | string
FilesOptions object
include array | null

The file match pattern to include in formatting and linting. Supports glob pattern.

Default:
[
  "**/*.toml"
]
minItems=1
exclude array | null

The file match pattern to exclude from formatting and linting. Supports glob pattern.

minItems=1
FormatOptions object
rules FormatRules | null
FormatRules object
array-bracket-space-width ArrayBracketSpaceWidth | null
key = [ 1, 2, 3 ]
#      ^       ^  <- this
Default: 0
array-comma-space-width ArrayCommaSpaceWidth | null
key = [ 1, 2, 3 ]
#         ^  ^    <- this
Default: 1
date-time-delimiter DateTimeDelimiter | null

In accordance with RFC 3339, you can use T or space character between date and time.

  • T: Use T between date and time like 2001-01-01T00:00:00
  • space: Use space between date and time like 2001-01-01 00:00:00
  • preserve: Preserve the original delimiter.
Default: "T"
indent-style IndentStyle | null

Whether to use spaces or tabs for indentation.

  • space: Use spaces for indentation.
  • tab: Use tabs for indentation.
Default: "space"
indent-sub-tables boolean | null

If true, the sub-table will be indented.

[table]
    [table.sub-table]
    key = "value"
# ^^  <- this
Default: false
indent-table-key-value-pairs boolean | null

If true, the table key-value pairs will be indented.

[table]
    key = "value"
# ^^  <- this
Default: false
indent-width IndentWidth | null

⚠️ WARNING ⚠️
This option is only used when the indentation style is space.

Default: 2
inline-table-brace-space-width InlineTableBraceSpaceWidth | null
key = { a = 1, b = 2 }
#      ^            ^  <- this
Default: 1
inline-table-comma-space-width InlineTableCommaSpaceWidth | null
key = { a = 1, b = 2 }
#             ^  <- this
Default: 1
key-value-equals-sign-alignment boolean | null

If true, the equals sign in the key-value pairs will be aligned.

⚠️ WARNING ⚠️
This feature does not apply to key-value pairs inside single line inline tables.

# BEFORE
key = "value1"
key2 = "value2"
key3.key4 = "value3"

# AFTER
key       = "value1"
key2      = "value2"
key3.key4 = "value3"
Default: false
string-quote-style StringQuoteStyle | null

Choose which quote style the formatter prefers for basic strings.

Default: "double"
trailing-comment-alignment boolean | null

If true, the trailing comments in value/key-value pairs will be aligned.

📝 NOTE 📝
The trailing comments of table header are not targeted by alignment.

# BEFORE
key = "value1"  # comment 1
key2 = "value2"  # comment 2
key3.key4 = "value3"  # comment 3

# AFTER
key = "value1"        # comment 1
key2 = "value2"       # comment 2
key3.key4 = "value3"  # comment 3
Default: false
key-value-equals-sign-space-width KeyValueEqualsSignSpaceWidth | null
key = "value"
#  ^ ^  <- this
Default: 1
line-ending LineEnding | null

In TOML, the line ending must be either LF or CRLF.

  • lf: Line Feed only (\n), common on Linux and macOS as well as inside git repos.
  • crlf: Carriage Return Line Feed (\r\n), common on Windows.
Default: "auto"
line-width LineWidth | null

The formatter will try to keep lines within this width.

Default: 80
trailing-comment-space-width TrailingCommentSpaceWidth | null
key = "value"  # trailing comment
#            ^^  <- this
Default: 2
ArrayBracketSpaceWidth integer
ArrayCommaSpaceWidth integer
DateTimeDelimiter string | string | string

DateTime delimiter

IndentStyle string
IndentWidth integer
InlineTableBraceSpaceWidth integer
InlineTableCommaSpaceWidth integer
StringQuoteStyle string | string | string

The preferred quote character for strings.

KeyValueEqualsSignSpaceWidth integer
LineEnding string | string
LineWidth integer
TrailingCommentSpaceWidth integer
LintOptions object
rules LintRules | null
LintRules object
key-empty SeverityLevelDefaultWarn | null

Check if the key is empty.

# VALID BUT DISCOURAGED
"" = true
dotted-keys-out-of-order SeverityLevelDefaultWarn | null

Check if dotted keys are defined out of order.

# VALID BUT DISCOURAGED
apple.type = "fruit"
orange.type = "fruit"
apple.skin = "thin"
orange.skin = "thick"

# RECOMMENDED
apple.type = "fruit"
apple.skin = "thin"
orange.type = "fruit"
orange.skin = "thick"
tables-out-of-order SeverityLevelDefaultWarn | null

Check if tables are defined out of order.

# VALID BUT DISCOURAGED
[fruit.apple]
[animal]
[fruit.orange]

# RECOMMENDED
[fruit.apple]
[fruit.orange]
[animal]
SeverityLevelDefaultWarn
SeverityLevel string
LspOptions object
code-action LspCodeAction | null
completion LspCompletion | null
diagnostic LspDiagnostic | null
document-link LspDocumentLink | null
formatting LspFormatting | null
goto-declaration LspGotoDefinition | null
goto-definition LspGotoDefinition | null
goto-type-definition LspGotoDefinition | null
hover LspHover | null
workspace-diagnostic LspWorkspaceDiagnostic | null
LspCodeAction object
enabled BoolDefaultTrue | null

Whether to enable code action.

BoolDefaultTrue boolean
LspCompletion object
enabled BoolDefaultTrue | null

Whether to enable completion.

LspDiagnostic object
enabled BoolDefaultTrue | null

Whether to enable diagnostic.

LspFormatting object
enabled BoolDefaultTrue | null

Whether to enable formatting.

LspGotoDefinition object
enabled BoolDefaultTrue | null

Whether to enable goto definition.

LspHover object
enabled BoolDefaultTrue | null

Whether to enable hover.

LspWorkspaceDiagnostic object
enabled BoolDefaultTrue | null

Whether to enable workspace diagnostic.

SchemaOverviewOptions object
enabled BoolDefaultTrue | null
strict BoolDefaultTrue | null

If additionalProperties is not specified in the JSON Schema, the strict mode treats it as additionalProperties: false, which is different from the JSON Schema specification.

catalog SchemaCatalog | null
SchemaCatalog object
paths array | null

The catalog is evaluated after the schemas specified by [[schemas]].
Schemas are loaded in order from the beginning of the catalog list.

Default:
[
  "tombi://www.schemastore.org/api/json/catalog.json",
  "https://www.schemastore.org/api/json/catalog.json"
]
SchemaCatalogPath string

Generic value that can be either single or multiple

SchemaItem RootSchema | SubSchema
RootSchema object
path string required
include string[] required

The file match pattern to include the target to apply the schema. Supports glob pattern.

minItems=1
toml-version TomlVersion | null
format SchemaFormatOptions | null
lint SchemaLintOptions | null
overrides array | null
SchemaFormatOptions object
rules SchemaFormatRules | null
SchemaFormatRules object
array-values-order SchemaArrayValuesOrderRule | null
table-keys-order SchemaTableKeysOrderRule | null
SchemaArrayValuesOrderRule object
enabled BoolDefaultTrue | null
SchemaTableKeysOrderRule object
enabled BoolDefaultTrue | null
SchemaLintOptions object
rules SchemaLintRules | null
SchemaLintRules object
deprecated SeverityLevelDefaultWarn | null

Override the deprecated diagnostic level for this schema.

SchemaOverrideItem object
targets PatternAccessor[] required
minItems=1
PatternAccessor string

To apply it to the Root Table, use "".

Array indices are matched as wildcards. That means [*] and numeric indices such as [0] are treated the same and will match any array element, so items[0].name behaves like items[*].name.

Example:

  • ""
  • "tool.*"
  • "items[*].name"
SchemaOverrideFormatOptions object
SchemaOverrideFormatRules object
array-values-order SchemaOverrideArrayValuesOrderRule | null
table-keys-order SchemaOverrideTableKeysOrderRule | null
SchemaOverrideArrayValuesOrderRule ArrayValuesOrder | SchemaArrayValuesOrderRule
ArrayValuesOrder string
SchemaOverrideTableKeysOrderRule TableKeysOrder | SchemaTableKeysOrderRule
TableKeysOrder string
SchemaOverrideLintOptions object
SchemaOverrideLintRules object
deprecated SeverityLevelDefaultWarn | null
SubSchema object
root string required
Examples: "tool.tombi", "items[0].name"
minLength=1
path string required
include string[] required

The file match pattern to include the target to apply the sub schema. Supports glob pattern.

minItems=1
format SchemaFormatOptions | null
lint SchemaLintOptions | null
overrides array | null
OverrideItem object
files required
All of: Files options to override object
format OverrideFormatOptions | null
lint OverrideLintOptions | null
OverrideFilesOptions object
include string[] required

The file match pattern to include in formatting and linting. Supports glob pattern.

minItems=1
exclude array | null

The file match pattern to exclude from formatting and linting. Supports glob pattern.

minItems=1
OverrideFormatOptions object
enabled BoolDefaultTrue | null
rules FormatRules | null
OverrideLintOptions object
enabled BoolDefaultTrue | null
rules LintRules | null
Extensions object

🚧 Currently, third-party extensions are not supported, and only built-in extensions are provided. 🚧

tombi-toml/cargo CargoExtensionFeatures | null

Configure built-in support for Cargo.toml.

tombi-toml/pyproject PyprojectExtensionFeatures | null

Configure built-in support for pyproject.toml.

tombi-toml/tombi TombiExtensionFeatures | null

Configure built-in support for tombi.toml.

CargoExtensionFeatures EnabledOnly | CargoExtensionFeatureTree
EnabledOnly object
enabled required

Whether this feature is enabled.

All of: BoolDefaultTrue boolean
CargoExtensionFeatureTree object
lsp CargoLspFeatures | null
CargoLspFeatures EnabledOnly | CargoLspFeatureTree
CargoLspFeatureTree object
completion CargoCompletionFeatures | null
inlay-hint CargoInlayHintFeatures | null
goto-definition CargoNavigationFeatures | null
goto-declaration CargoNavigationFeatures | null
document-link CargoDocumentLinkFeatures | null
hover CargoHoverFeatures | null
code-action CargoCodeActionFeatures | null
CargoCompletionFeatures EnabledOnly | CargoCompletionFeatureTree
CargoCompletionFeatureTree object
dependency-version ToggleFeatureDefaultTrue | null

Whether completion suggests dependency versions.

dependency-feature ToggleFeatureDefaultTrue | null

Whether completion suggests dependency features.

Whether completion suggests filesystem paths.

ToggleFeatureDefaultTrue object
enabled BoolDefaultTrue | null

Whether this nested feature is enabled.

CargoInlayHintFeatures EnabledOnly | CargoInlayHintFeatureTree
CargoInlayHintFeatureTree object
dependency-version ToggleFeatureDefaultTrue | null

Whether inlay hints show dependency versions.

default-features ToggleFeatureDefaultTrue | null

Whether inlay hints show default-features values.

workspace-value ToggleFeatureDefaultTrue | null

Whether inlay hints show values inherited from the Cargo workspace.

CargoNavigationFeatures EnabledOnly | CargoNavigationFeatureTree
CargoNavigationFeatureTree object
dependency ToggleFeatureDefaultTrue | null

Whether navigation resolves dependency definitions and declarations.

member ToggleFeatureDefaultTrue | null

Whether navigation resolves workspace member targets.

Whether navigation resolves filesystem paths.

CargoDocumentLinkFeatures EnabledOnly | CargoDocumentLinkFeatureTree
CargoDocumentLinkFeatureTree object
cargo-toml ToggleFeatureDefaultFalse | null

Whether document links are created for Cargo.toml references.

crates-io ToggleFeatureDefaultTrue | null

Whether document links are created for crates.io package references.

Whether document links are created for Git references.

Whether document links are created for filesystem paths.

workspace ToggleFeatureDefaultFalse | null

Whether document links are created for workspace = true references.

ToggleFeatureDefaultFalse object
enabled BoolDefaultFalse | null

Whether this nested feature is enabled.

BoolDefaultFalse boolean
CargoHoverFeatures EnabledOnly | CargoHoverFeatureTree
CargoHoverFeatureTree object
dependency-detail ToggleFeatureDefaultTrue | null

Whether hover shows detailed dependency metadata.

CargoCodeActionFeatures EnabledOnly | CargoCodeActionFeatureTree
CargoCodeActionFeatureTree object
inherit-from-workspace ToggleFeatureDefaultTrue | null

Whether code actions can replace a value with workspace = true.

inherit-dependency-from-workspace ToggleFeatureDefaultTrue | null

Whether code actions can inherit dependency settings from the workspace.

convert-dependency-to-table-format ToggleFeatureDefaultTrue | null

Whether code actions can rewrite inline dependencies to table format.

add-to-workspace-and-inherit-dependency ToggleFeatureDefaultTrue | null

Whether code actions can add a dependency to the workspace and inherit it.

PyprojectExtensionFeatures EnabledOnly | PyprojectExtensionFeatureTree
PyprojectExtensionFeatureTree object
PyprojectLspFeatures EnabledOnly | PyprojectLspFeatureTree
PyprojectLspFeatureTree object
completion PyprojectCompletionFeatures | null

Configure pyproject completion features.

inlay-hint PyprojectInlayHintFeatures | null

Configure pyproject inlay hint features.

goto-definition PyprojectNavigationFeatures | null

Configure pyproject go-to-definition features.

goto-declaration PyprojectNavigationFeatures | null

Configure pyproject go-to-declaration features.

document-link PyprojectDocumentLinkFeatures | null

Configure pyproject document link features.

hover PyprojectHoverFeatures | null

Configure pyproject hover features.

code-action PyprojectCodeActionFeatures | null

Configure pyproject code action features.

PyprojectCompletionFeatures EnabledOnly | PyprojectCompletionFeatureTree
PyprojectCompletionFeatureTree object

Whether completion suggests filesystem paths.

PyprojectInlayHintFeatures EnabledOnly | PyprojectInlayHintFeatureTree
PyprojectInlayHintFeatureTree object
dependency-version ToggleFeatureDefaultTrue | null

Whether inlay hints show resolved dependency versions.

PyprojectNavigationFeatures EnabledOnly | PyprojectNavigationFeatureTree
PyprojectNavigationFeatureTree object
dependency ToggleFeatureDefaultTrue | null

Whether navigation resolves dependency definitions and declarations.

member ToggleFeatureDefaultTrue | null

Whether navigation resolves workspace member targets.

Whether navigation resolves filesystem paths.

PyprojectDocumentLinkFeatures EnabledOnly | PyprojectDocumentLinkFeatureTree
PyprojectDocumentLinkFeatureTree object
pyproject-toml ToggleFeatureDefaultFalse | null

Whether document links are created for pyproject.toml references.

pypi-org ToggleFeatureDefaultTrue | null

Whether document links are created for pypi.org package references.

PyprojectHoverFeatures EnabledOnly | PyprojectHoverFeatureTree
PyprojectHoverFeatureTree object
dependency-detail ToggleFeatureDefaultTrue | null

Whether hover shows detailed dependency metadata.

PyprojectCodeActionFeatures EnabledOnly | PyprojectCodeActionFeatureTree
PyprojectCodeActionFeatureTree object
use-workspace-dependency ToggleFeatureDefaultTrue | null

Whether code actions can reuse a dependency declared in the workspace.

add-to-workspace-and-use-workspace-dependency ToggleFeatureDefaultTrue | null

Whether code actions can add a dependency to the workspace and reuse it.

TombiExtensionFeatures EnabledOnly | TombiExtensionFeatureTree
TombiExtensionFeatureTree object
lsp TombiLspFeatures | null
TombiLspFeatures EnabledOnly | TombiLspFeatureTree
TombiLspFeatureTree object
completion TombiCompletionFeatures | null

Configure Tombi completion features.

goto-definition TombiGotoDefinitionFeatures | null

Configure Tombi go-to-definition features.

document-link TombiDocumentLinkFeatures | null

Configure Tombi document link features.

hover TombiHoverFeatures | null

Configure Tombi hover features.

TombiCompletionFeatures EnabledOnly | TombiCompletionFeatureTree
TombiCompletionFeatureTree object

Whether completion suggests filesystem paths.

TombiGotoDefinitionFeatures EnabledOnly | TombiGotoDefinitionFeatureTree
TombiGotoDefinitionFeatureTree object

Whether go-to-definition resolves filesystem paths.

TombiDocumentLinkFeatures EnabledOnly | TombiDocumentLinkFeatureTree
TombiDocumentLinkFeatureTree object

Whether document links are created for filesystem paths.

TombiHoverFeatures EnabledOnly | TombiHoverFeatureTree
TombiHoverFeatureTree object