Configure Editor

This section describes the settings available to you to customise how Syside Editor works.

At the moment, Syside Editor can only be configured through Visual Studio Code settings. In the future we plan to support configuration through syside.toml configuration files.

Tip

VSCode has two types of settings: User and Workspace. User settings are meant for personal settings that apply to all of your projects. If you work in a team or have settings that should only apply to one project, consider using Workspace settings instead. For more information, refer to VSCode documentation linked above.

General Settings

  • syside.path – This setting overrides the path to the Syside language server executable. If this setting is not set, Editor extension will attempt to download the language server executable and use it.

  • syside.stdlib – This setting overrides the path to the standard SysML library. If this setting 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.

  • syside.completionLimit – This setting controls the maximum number of completions being shown in the auto-complete dropdown when editing textual files. Default is 256, and setting to 0 will disable any limits. Lower values reduce completion latency.

Logging

  • syside.log – This setting overrides the path to the log file of the Syside language server. If this setting is not set, Syside will use the default log file created in a location designated by Visual Studio Code. The currently used active log file’s path can be found in Visual Studio Code’s Output > Syside pane. Note that Syside attempts to rotate log files, however this may fail on certain configurations, e.g. Windows and VS Code when the log file is open in another process, in which case the log file will be overwritten.

  • syside.logLevel – This setting controls how much information Syside should record in the log file. Currently available options, listed from the most verbose to the least verbose:

    • trace – Should not be used day-to-day, only for troubleshooting. Contains all language server communication messages and their contents, leading to huge log files.

    • debug – Should not be used day-to-day, only for troubleshooting. Contains all language server communication messages, leading to huge log files.

    • info – The default. Good for day-to-day usage.

    • warning

    • error

    • critical

    • off – Completely disables any logging.

Controlling Which Files Are Analysed

  • syside.include – Allows including additional files and/or directories from outside the current 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.

  • syside.exclude – Allows omitting files and/or directories from automatic discovery, parsing, and analysis. 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 root directories from include items, so directory in both include and exclude will be searched non-recursively. This setting supports glob patterns.

Path Globbing

Above 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)

  • [...] – 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.

SysML Settings

  • syside.lineLength – This settings controls the maximum line length that the Syside formatter will try to fit code into. The default is 100 columns. Note that formatter does not have automatic paragraph wrapping for long comments, docs and notes. To help with comment, docs, and notes line lengths, Sensmetry recommends also setting the Visual Studio Code’s in-built editor.rulers setting to the same value, which will show you a ruler at the given character limit, enabling you to manually break down your comments according to the limit.

  • syside.edit – This setting controls which document tiers are treated as editable. This setting affects the renaming feature, and diagnostics. Currently, the following options are available:

    • project – Default option. Allows editing only project files.

    • external – Additionally allows editing external libraries (except the standard library).

    • all – Additionally allows editing standard library.