Skip to content

Commit 4310265

Browse files
matthewbastienheckj
andcommitted
Apply suggestions from code review
Co-authored-by: Joseph Heck <j_heck@apple.com>
1 parent 6c305e6 commit 4310265

File tree

11 files changed

+41
-31
lines changed

11 files changed

+41
-31
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ If you'd like to return to using the released version of the extension you can u
6464

6565
Occasionally, pre-release builds will be published to the VS Code Marketplace. You can switch to the pre-release version by clicking on the `Switch to Pre-Release Version` button in the Extensions View:
6666

67-
![](userdocs/userdocs.docc/Resources/install-pre-release.png)
67+
![A snapshot of VS Code that has Extensions highlighted, showing the Swift extension. In the detail panel of the extension view, a red box highlights the button "Switch to Pre-Release Version".](userdocs/userdocs.docc/Resources/install-pre-release.png)
6868

6969
Switching back to the release version can be done by clicking on the `Switch to Release Version` button.
7070

userdocs/userdocs.docc/Articles/Advanced/install-pre-release.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
Try out the latest updates by switching to the pre-release version.
44

5-
The Swift extension provides pre-release builds that let you test out unreleased features or get bug fixes before an official release can be published. Pre-release build numbers are always one minor version ahead of the most recent release.
5+
The Swift extension provides pre-release builds that you can use to test out unreleased features or get bug fixes before the project publishes an official release. Pre-release build numbers are one minor version ahead of the most recent release.
66

77
The "Switch to Pre-Release Version" button in the VS Code extensions view is used to install the latest pre-release builds:
88

9-
![](install-pre-release.png)
9+
![A snapshot of VS Code that has Extensions highlighted, showing the Swift extension. In the detail panel of the extension view, a red box highlights the button "Switch to Pre-Release Version".](install-pre-release.png)
1010

11-
A "Switch to Release Version" button will appear in its place that lets you go back to the official release.
11+
When you select to use a pre-release version, the button changes to "Switch to Release Version", which lets you go back to the official release.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Automatic Task Creation
22

3-
Tasks added for common operations with your Package.
3+
Add tasks for common operations with your Package.
44

5-
> 💡 Tip: Tasks use workflows common to all VS Code extensions. For more information see [the VS Code documentation for tasks](https://code.visualstudio.com/docs/editor/tasks).
5+
For workspaces that contain a `Package.swift` file, the Swift extension adds the following tasks:
66

7-
For workspaces that contain a **Package.swift** file, the Swift extension will add the following tasks:
7+
- **Build All**: Build all targets in the Package.
8+
- **Build Debug <Executable>**: Each executable in a Package.swift get a task for building a debug build.
9+
- **Build Release <Executable>**: Each executable in a Package.swift get a task for building a release build.
810

9-
- **Build All**: Build all targets in the Package
10-
- **Build Debug <Executable>**: Each executable in a Package.swift gets a task for building a debug build
11-
- **Build Release <Executable>**: Each executable in a Package.swift gets a task for building a release build
11+
> 💡 Tip: Tasks use workflows common to all VS Code extensions. For more information see [the VS Code documentation for tasks](https://code.visualstudio.com/docs/editor/tasks).
1212
1313
These tasks are available via the commands **Terminal ▸ Run Task...** and **Terminal ▸ Run Build Task...** in the command palette.

userdocs/userdocs.docc/Articles/Features/debugging.md

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

33
Debug your Swift executables using LLDB.
44

5+
When you open a Swift package (a directory containing a `Package.swift` file), the extension automatically generates build tasks and launch configurations for each executable within the package. Additionally, if the package includes tests, the extension creates a configuration specifically designed to run those tests. These configurations all leverage the CodeLLDB extension as the debugger of choice.
6+
57
> 💡 Tip: Debugging workflows are common to all VS Code extensions. See the [VS Code documentation about testing](https://code.visualstudio.com/docs/debugtest/testing) for a more in-depth overview.
68
>
79
> Debugging works best when using a version of the Swift toolchain 6.0 or higher.
810
9-
When you open a Swift package (a directory containing a `Package.swift` file), the extension automatically generates build tasks and launch configurations for each executable within the package. Additionally, if the package includes tests, the extension creates a configuration specifically designed to run those tests. These configurations all leverage the CodeLLDB extension as the debugger of choice.
10-
1111
Use the **Run > Start Debugging** menu item to run an executable and start debugging. If you have multiple launch configurations you can choose which launch configuration to use in the debugger view.
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Documentation Live Preview
22

3+
@Metadata {
4+
@Available("Swift", introduced: "6.2")
5+
}
6+
37
Show a live preview of your Swift documentation while editing.
48

5-
> Note: This feature is only available when using a Swift toolchain 6.2 or higher running on macOS or Linux.
69

7-
The Swift toolchain comes with a built-in documentation compiler called DocC that can be used to build documentation for your Swift code. This documentation can then be distributed to developers or other contributors. It's what we used to make the documentation for vscode-swift! You can learn more about DocC by reading [the documentation on the Swift organization's website](https://www.swift.org/documentation/docc/).
10+
The Swift toolchain provides DocC, which compiles documentation for your Swift package. You can distribute compiled documentation to developers, or host the content. It's what this project used to make its documentation! You can learn more about DocC by reading [the documentation on the Swift organization's website](https://www.swift.org/documentation/docc/).
811

9-
The Swift extension for VS Code can show you a side-by-side live preview of your documentation as you edit it. This feature can be accessed via the Preview Swift Documentation button at the top right of an editor or with the `Swift: Preview Documentation` command in the command palette. This will open up a new editor pane with your rendered documentation:
12+
View a side-by-side live preview of your documentation as you edit it with the Swift extension for VS Code.
13+
Access this feature using the Preview Swift Documentation button at the top right of an editor, or be invoking `Swift: Preview Documentation` in the command palette.
14+
This opens up a new editor pane with your rendered documentation:
1015

1116
![An animation showing how to launch documentation live preview.](docc-live-preview.gif)
17+
18+
> Note: This feature is only available when using a Swift toolchain 6.2 or higher running on macOS or Linux.
19+
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Language Features
22

3-
Language features to help you write Swift code.
4-
5-
> 💡 Tip: Language features are common to all VS Code extensions. See the [VS Code documentation about navigating code](https://code.visualstudio.com/docs/editing/editingevolved) for a more in-depth overview.
3+
Navigate and write your Swift code more easily with Language features.
64

75
The Swift extension provides language features such as code completion and jump to definition via [SourceKit-LSP](https://github.com/apple/sourcekit-lsp).
86

9-
> ⚠️ Important: With Swift toolchains prior to 6.1 you will need to build your project at least once for SourceKit-LSP to function correctly. Whenever you add a new dependency to your project, make sure to rebuild it so that SourceKit-LSP can update its information.
7+
> ⚠️ Important: With Swift toolchains prior to 6.1 you will need to build your project at least once for SourceKit-LSP to function correcly. Whenever you add a new dependency to your project, make sure to rebuild it so that SourceKit-LSP can update its information.
108
119
SourceKit-LSP provides background indexing in Swift toolchain 6.1 which will automatically index your project on startup. All indexing results are cached in the `.build/index-build` folder within your workspace.
1210

11+
Language features are common to all VS Code extensions. See the [VS Code documentation about navigating code](https://code.visualstudio.com/docs/editing/editingevolved) for a more in-depth overview.
12+
1313
SourceKit-LSP can be configured via extension settings. See <doc:settings> for more information.

userdocs/userdocs.docc/Articles/Features/test-explorer.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Running and Debugging Tests
22

3-
vscode-swift shows test results in the test explorer.
3+
View test results in the test explorer.
44

5-
> 💡 Tip: The Testing view is common to all VS Code extensions. See the [VS Code documentation about testing](https://code.visualstudio.com/docs/debugtest/testing) for a more in-depth overview.
65

7-
If your package contains tests then they can be viewed, run and debugged in the Test Explorer.
6+
All VS Code extensions provide a [testing capabilities and views(https://code.visualstudio.com/docs/debugtest/testing).
7+
View, run, and debug tests that your package containers in the Test Explorer.
88

9-
![](test-explorer.png)
9+
![A screenshot of the test explorer pane in Visual Studio Code that shows a selection of 5 tests run and passed.](test-explorer.png)
1010

1111
Once your project is built, the Test Explorer will list all your tests. These tests are grouped by package, then test target, and finally, by XCTestCase class. From the Test Explorer, you can initiate a test run, debug a test run, and if you have already opened a file, you can quickly jump to the source code for a test.
1212

userdocs/userdocs.docc/Articles/Reference/commands.md

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

33
Useful VS Code commands added by the Swift extension.
44

5-
> 💡 Tip: Commands can be accessed from the VS Code command palette which is common to all VS Code extensions. See the [VS Code documentation about the command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) for a more in-depth overview.
65

76
The Swift extension adds the following commands, each prefixed with `"Swift: "` in the command palette.
87

@@ -55,4 +54,6 @@ The following command is only available on macOS:
5554
- **`Capture Diagnostic Bundle`** - Capture a diagnostic bundle from VS Code, containing logs and information to aid in troubleshooting Swift-related issues.
5655
- **`Clear Diagnostics Collection`** - Clear all collected diagnostics in the current workspace to start fresh.
5756
- **`Restart LSP Server`** - Restart the Swift Language Server Protocol (LSP) server for the current workspace.
58-
- **`Re-Index Project`** - Force a re-index of the project to refresh code completion and symbol navigation support.
57+
- **`Re-Index Project`** - Force a re-index of the project to refresh code completion and symbol navigation support.
58+
59+
> 💡 Tip: Commands can be accessed from the VS Code command palette which is common to all VS Code extensions. See the [VS Code documentation about the command palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette) for a more in-depth overview.

userdocs/userdocs.docc/Articles/Reference/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Extension Settings
22

3-
vscode-swift provides various settings to configure its behaviour.
3+
Configure the behavior of the Swift extension.
44

55
> 💡 Tip: The Settings Editor is common to all VS Code extensions. See the [documentation about personalizing VS Code](https://code.visualstudio.com/docs/getstarted/personalize-vscode) for a more in-depth overview.
66

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Supported Toolchains
22

3-
vscode-swift supports several versions of the Swift toolchain.
3+
Find out which versions of Swift the extension supports.
44

5-
vscode-swift supports the following Swift toolchains:
5+
The Swift extension supports the following Swift toolchains:
66
* 5.9
77
* 5.10
88
* 6.0
99
* 6.1
10+
* 6.2
1011

1112
The extension also strives to work with the latest nightly toolchains built from the main branch.
1213

13-
Certain features of vscode-swift will only work with newer versions of the toolchains. We recommend using the latest version of the Swift toolchain to get the most benefit out of the extension. The following features only work with certain toolchains as listed:
14+
Certain features of the Swift extension will only work with newer versions of the toolchains. We recommend using the latest version of the Swift toolchain to get the most benefit out of the extension. The following features only work with certain toolchains as listed:
1415

15-
Feature | Minimum Toolchain Required
16+
Feature | Minimum Toolchain Required
1617
-------------------------- | -------------------------------------
1718
Debugging with `lldb-dap` | 6.0
1819
<doc:docc-live-preview> | 6.2

userdocs/userdocs.docc/userdocs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# vscode-swift
1+
# The Swift Extension for VS Code
22

33
@Metadata {
44
@TechnologyRoot

0 commit comments

Comments
 (0)