Config

class Config

Syside configuration using TOML 1.0. See TOML page for more details.

Example:

#:schema https://docs.sensmetry.com/schemas/latest/syside.schema.json

std = "path/to/sysml.library"
include = []
exclude = ["lib", "out", "dist"]

[lsp]
completion-limit = 256
edit = "all"

[telemetry]
crash-reports = "ignore"

[format]
line-width = 100
tab-width = 4
tabs = false

[format.keywords.null]
fallback = "null"
preserve = false

[lint]
standard-library-package = "warning"

Glob Patterns

Some configuration options support the following glob patterns.

  • * - Matches zero or more characters in a path segment. E.g. *.sysml matches all files that end with .sysml.

  • ? - Matches one character in a path segment. E.g. ?at will match cat and bat, but not chat.

  • ** - Matches any number of path segments, including none. E.g. /x/**/y could match /x/y, /x/a/y, /x/a/b/y.

  • {...} - Groups conditions. E.g. *.{ker,sys}ml to match both KerML and SysML files (the default behaviour).

  • [...] - Declares a set or range of characters to match in a path segment. E.g. example[0-9] matches files example0, example1.

  • [!...] - Declares a negation set or range of characters. E.g. example[!0-9] will not match example1, but will match exampleA.

  • [^...] - Same as [!...] to match Unix bash behaviour.

Glob patterns use \ to escape characters thus it cannot be used as a directory separator on Windows. Please use / to separate directories which works on all platforms. Additionally, patterns starting with / are treated as absolute on all platforms.

Members defined in Config (8 members)

exclude

RW

Files and/or directories to be omitted from automatic discovery, parsing, and analysis.

format

RW

Formatter configuration.

include

RW

Additional files and/or directories to include in the workspace.

lint

RW

Configuration for validations and lints.

lsp

RW

LSP configuration.

std

RW

Path to the standard SysML library, e.g. sysml.library.

telemetry

RW

Telemetry configuration.

__init__

Attributes

property exclude: list[str] | None

Files and/or directories to be omitted from automatic discovery, parsing, and analysis.

Unlike other options, exclude values are merged from inherited configs instead of being overwritten.

This can be used to exclude folders containing automatically generated files, e.g. build folder, from the current workspace. It can also be used in large workspaces to improve startup times by disabling large directories. Note that exclusions are applied before deciding whether a file should be parsed or a directory recursed into but after resolving the root directories from include items, so directory in both include and exclude will be searched non-recursively. This setting supports glob patterns. Relative paths and patterns are resolved relative to the directory that is being searched, matching .gitignore behaviour.

property format: syside.conf.Format

Formatter configuration.

property include: list[str] | None

Additional files and/or directories to include in the workspace.

This is useful for including external libraries in a project. Note that validation is not performed for files included this way, and that by default Syside ignores hidden files and directories (denoted by the leading . character), and thus this setting would need to be used to include them. This setting supports glob patterns. Relative paths and patterns are resolved relative to the directory where they were declared:

  • Current working directory when provided as a CLI argument;

  • Directory of the configuration file if declared in one.

property lint: syside.conf.Lint

Configuration for validations and lints.

property lsp: syside.conf.Lsp

LSP configuration.

property std: str | None

Path to the standard SysML library, e.g. sysml.library.

If this is not set, Syside uses a bundled compatible standard library. This setting can be used to experiment with different SysML specification versions or to use a customised SysML library. Keep in mind that using standard libraries other than the bundled one can result in spurious and false-positive diagnostics.

property telemetry: syside.conf.Telemetry

Telemetry configuration.

Methods

__init__() None
Used in