Contact us Start a Trial

Settings File Reference

Modular projects store configuration options, e.g. linting preferences or formatting preferences in a .sigasi/settings.json file in the project directory. Keeping these in a single file makes it easy to share consistent configuration across teammates and projects, and to fine-tune behavior per target, folder, or file.

Compiler related options such as language version, preprocessor include directories and defines, VHDL conditional analysis variables, are not part of this settings file. These options are stored in the project.sigasi file.

The settings can be configured by right-clicking a project, folder, or file in the Projects view, and selecting Configure > [Project/Folder/File] Settings:

  • Settings for a project, folder, or file will configure settings for all targets.
  • Settings for a specific target folder inside the Targets folder will configure project-wide settings for that target.
  • Settings for a file inside the Targets folder will configure file-specific settings for the corresponding target.

Not all functionality is exposed through the UI. For example, settings sharing requires editing settings.json directly. Refer to the documentation below for the exact format of the file.

The settings file uses the JSONC format (JSON with comments). At the top level it’s a JSON object with key-value pairs corresponding to project-wide settings.

Projects that were created before the .sigasi/settings.json format existed may still rely on a Classic .settings directory in the project root. Sigasi continues to support this layout for backward compatibility; if a .settings directory is present, it takes precedence over .sigasi/settings.json.

Example:

JSON
{
    // VHDL formatting settings
    "vhdl.formatting.preserveNewlines": true,
    "vhdl.formatting.keywordsCase": "LOWERCASE",
    "vhdl.formatting.trailingCommentsAlignmentColumn": 50
}

In addition to configuration key-value pairs, the following special fields can be used in the project section:

FieldDescription
@overrideSpecify folder- or file-specific settings
@targetsSpecify target-specific settings
@includeInclude other settings files

@override

Specific configuration for a folder or file can be specified in the @override section. Each key is a path to a folder or file in the Projects View. The value is an object with settings for that folder or file. Note that the order of the specified paths is irrelevant. Instead, overrides for longer paths (= more specific) have higher priority. If you specify settings for a folder, they will apply for each file in the folder and in all its nested folders. To further specify the configuration for nested folders or files, add specific settings for them in the @override section.

In addition to configuration key-value pairs, the following special fields can be used in the @override section:

FieldDescription
@targetsSpecify target-specific settings
@includeInclude other settings files

Example:

JSON
{
    "@override": {
        "shared": {
            "verilog.rules.20.severity": "WARNING",
            "verilog.rules.20.parameters.max_line_length": 80,
            "verilog.rules.21.severity": "WARNING",
            "verilog.rules.172.parameters.allowed_sequences": "LF_ONLY"
        },
        "shared/constants.sv": {
            "verilog.rules.172.parameters.allowed_sequences": "CRLF_ONLY"
        },
        "${LIBS}/cells": {
            "verilog.rules.172.parameters.allowed_sequences": "LF_ONLY"
        }
    }
}

@targets

A distinct configuration for project targets can be specified in the @targets section. Each key is the name of a target. The value is an object with settings for that target. If the @targets section is specified in the project section, then the settings are applied to all target files. If the @targets section is specified in the @override section, then the settings are applied to the corresponding folders and files when they are part of the specified target.

In addition to configuration key-value pairs, the following special fields can be used in the @targets section:

FieldDescription
@includeInclude other settings files

Example:

JSON
{
    "@targets": {
        "rtl": {
            "vhdl.rules.252.severity": "WARNING",
            "vhdl.rules.252.parameters.reset_style": "SYNCHRONOUS"
        }
    },
    "@override": {
        "shared": {
            "@targets": {
                "rtl": {
                    "vhdl.rules.252.parameters.reset_style": "ASYNCHRONOUS"
                }
            }
        }
    }
}

@include

Including other files

In addition to settings specified in the main settings.json file, it is possible to create separate settings files with a common configuration and include them in the project section or any @override or @targets section. To do so, an @include field should be specified in the corresponding section. The value is the path to the file you want to include. The path should be relative to the settings file you are including it in. This is similar to the -F option in .f argument files. You can specify multiple files to include. In this case, the value should be a JSON array of file paths to include.

You can include any JSONC file with the configuration key-value pairs that you would otherwise specify in the main settings.json file. Included settings files can include other settings files as well. If the same key is specified both in the included file and in the section it is included in, the local value has priority over the value from the included file. If the same key is specified in multiple files that are included in the same section, the value specified in the file that is included later has priority.

NOTE: Included files cannot use @override or @targets sections. The configuration specified in those files is applied to the section they are included in.

Example:

JSON
{
    "@include": ["formatting-settings.json", "../rules/common.json"],
    "@targets": {
        "rtl": {
            "@include": "../rules/rtl.json"
        }
    },
    "@override": {
        "ip": {
            "@include": "../rules/ip.json"
        }
    }
}

Built-in include files

To set all linting rules to the IGNORE severity, you can use the built-in ignore-all include file. For example, if we want to disable all linting rules except #12, use:

JSON
{
    "@include": "sigasi-settings:/ignore-all",
    "verilog.rules.12.severity": "WARNING",
}

Setting priorities

Setting keys can be specified in different sections and for different files and folders. If the same key is specified in multiple sections or for multiple folders and files, the value from the more specific context has higher priority. Here’s the list of contexts ordered from higher to lower priority:

  1. Settings in the @targets section for a target in the @override section for a file.
  2. Settings directly in the @override section for a file.
  3. Settings in the @targets section for a target in the @override section for a file’s containing folder.
  4. Settings directly in the @override section for a file’s containing folder.
  5. Settings in the @targets section for a target in the @override section for a parent folder, if any.
  6. Settings directly in the @override section for a parent folder, if any.
  7. Settings in the @targets section for a target in the project section.
  8. Settings directly in the project section.