Skip to content

Commit a5e141a

Browse files
Update documentation for swiftly (#1905)
1 parent b72296f commit a5e141a

File tree

4 files changed

+34
-4
lines changed

4 files changed

+34
-4
lines changed

userdocs/userdocs.docc/Articles/Topics/installation.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Install the Swift extension via the VS Code Marketplace.
44

5-
The Swift extension is supported on macOS, Linux, and Windows.
5+
The Swift extension is supported on macOS, Linux, and Windows. To set it up:
6+
1. Install Swift from the [Swift.org website](https://www.swift.org/install).
7+
2. Install [Visual Studio Code](https://code.visualstudio.com/Download).
8+
3. Install the Swift extension from the [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=swiftlang.swift-vscode).
69

7-
To install, firstly ensure you have [Swift installed on your system](https://www.swift.org/install/). Then [install the Swift extension](https://marketplace.visualstudio.com/items?itemName=swiftlang.swift-vscode). Once your machine is ready, you can get started with the **Swift: Create New Project...** command.
10+
Once your machine is ready, you can start writing Swift code:
11+
* Use the **`Swift: Create New Project...`** command from the command palette to initialize a new project.
12+
* Navigate to **`File > Open Folder`** in the menu bar to open an existing project on your machine.

userdocs/userdocs.docc/Articles/Topics/supported-toolchains.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,39 @@ Feature | Minimum Toolchain Required
1818
Debugging with `lldb-dap` | 6.0
1919
<doc:docc-live-preview> | 6.2
2020

21+
## Toolchain Management
22+
23+
The Swift extension automatically detects installations of the Swift toolchain in your environment. It looks for a `swift` binary available in `PATH` and, if one cannot be found, prompts you to [install a toolchain from Swift.org](https://www.swift.org/install).
24+
25+
If you have multiple Swift toolchains installed on your system, use the command `Swift: Select Toolchain...` to tell the extension which toolchain to use. The command shows you a list of all the toolchains that VS Code found on your system and lets you switch between them.
26+
27+
@Video(
28+
source: "toolchain-selection.mp4",
29+
alt: "A video showing a VS Code window. The command palette is opened to run the 'Swift: Select Toolchain...' command which is then used to select Xcode as the preferred toolchain.",
30+
poster: "toolchain-selection.png"
31+
)
32+
2133
## Swiftly Support
2234

23-
The extension supports toolchains managed by [swiftly](https://github.com/swiftlang/swiftly), the Swift toolchain installer and manager. For instructions on installing swiftly see the [installation instructions on Swift.org](https://www.swift.org/install).
35+
The extension supports toolchains managed by [swiftly](https://github.com/swiftlang/swiftly), the Swift toolchain installer and manager. This is the recommended way of installing Swift toolchains on macOS and Linux. For instructions on installing swiftly see the [installation instructions on Swift.org](https://www.swift.org/install). There is also a [getting started guide for swiftly on Swift.org](https://www.swift.org/swiftly/documentation/swiftly/getting-started/).
2436

25-
You can choose a swiftly managed toolchain to use from the `> Swift: Select Toolchain` menu.
37+
Choose a swiftly managed toolchain to use from the `> Swift: Select Toolchain...` menu.
2638

2739
If you do `swiftly use` on the command line you must restart VS Code or do `> Developer: Reload Window` in order for the VS Code Swift extension to start using the new toolchain.
2840

41+
### Installing Toolchains
42+
43+
The Swift extension can use swiftly to install toolchains on your behalf. This allows you to discover, install, and configure Swift toolchains directly from the VS Code interface without needing to use the command line.
44+
45+
Before using the toolchain installation feature, ensure you meet the following requirements:
46+
47+
* **Swiftly 1.1.0 or newer** - The installation feature requires swiftly version 1.1.0 or newer. Run **`swiftly self-update`** in your terminal to get the latest version of swiftly.
48+
* **Administrator Privileges** - On Linux systems, `sudo` may be required to install system dependencies for the toolchain after installation.
49+
50+
You can access the installation commands via the `Swift: Select Toolchain...` command, or by running the following commands directly:
51+
- **`Swift: Install Swiftly Toolchain...`** - installs stable Swift toolchains via swiftly
52+
- **`Swift: Install Swiftly Snapshot Toolchain...`** - installs snapshot Swift toolchains via swiftly
53+
2954
### .swift-version Support
3055

3156
Swiftly can use a special `.swift-version` file in the root of your package so that you can share your toolchain preference with the rest of your team. The VS Code Swift extension respects this file if it exists and will use the toolchain specified within it to build and test your package.
965 KB
Binary file not shown.
318 KB
Loading

0 commit comments

Comments
 (0)