Jump to Definition does not work for a simple swift iOS Xcode project in VScode

I got it working by passing source kit server arguments:

there is a demo project available here: GitHub - markst/hotreloading-vscode-ios: Demonstrating iOS development environment in VSCode using XcodeGen + HotReloading.

i.e:

  "sourcekit-lsp.serverArguments": [
    "-Xswiftc",
    "-sdk",
    "-Xswiftc",
    "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk",
    "-Xswiftc",
    "-target",
    "-Xswiftc",
    "arm64-apple-ios13.0-simulator",
    "-Xcc",
    "-DSWIFT_PACKAGE=0" // Build package as if it were Application?
  ]