Skip to content

syntax highlighting broken #1851

@cyrfer

Description

@cyrfer

I have a .swift file with this code:

public struct MyWebView: UIViewRepresentable {

and I get the following error:

Cannot find type 'UIViewRepresentable' in scopeSourceKit

Image

It seems like the correct toolchain is already selected, from the command palette:

Image

I am not able to provide the exact path via the command palette, but I did provide the following folder "/bin" from this output

xcrun --find swift
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift

to the user and workspace settings:

Image

I have been building my SDK package successfully via the CLI with:

# list available
xcodebuild -showdestinations -scheme MySDK

# select one of the results (name:iPhone 16 Pro)
TARGET_DESTINATION="9C34C3AD-D86D-464B-B8F6-7ACE24EF3025"

xcodebuild build \
  -scheme MySDK \
  -destination "id=$TARGET_DESTINATION" \
  -configuration Debug

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedsourcekit-lspSourceKit-LSP issue

    Type

    No type

    Projects

    Status

    Unscreened

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions