Skip to content

Is it possible to configure the extension to enable a non-default package trait #2095

@tachyonics

Description

@tachyonics

At the moment I am trying to develop a package with a package trait. If I make this trait enabled by default everything works as expected - its dependencies show up in the sidecar and code completion within any conditional code works as expected.

However if I make the trait not enabled by default, I haven't been able to configure the extension to temporarily enable it for development. I attempted to set .sourcekit-lsp/config.json as

{
    "swiftPM": {
        "traits": ["DynamoDB"]
    }
}

as per https://github.com/swiftlang/sourcekit-lsp/blob/main/Documentation/Configuration%20File.md but this didn't have any effect (the extension treats the trait as disabled). Is there any way to enable this temporarily for development?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions