-
Notifications
You must be signed in to change notification settings - Fork 77
Convert docs to DocC #1437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Convert docs to DocC #1437
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This source file is part of the VS Code Swift open source project | ||
// | ||
// Copyright (c) 2025 the VS Code Swift project authors | ||
// Licensed under Apache License v2.0 | ||
// | ||
// See LICENSE.txt for license information | ||
// See CONTRIBUTORS.txt for the list of VS Code Swift project authors | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
import * as vscode from "vscode"; | ||
|
||
/** | ||
* Handle the user requesting to show the vscode-swift documentation. | ||
*/ | ||
export async function openDocumentation(): Promise<boolean> { | ||
return await vscode.env.openExternal( | ||
vscode.Uri.parse("https://www.swift.org/vscode/documentation/vscode") | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Automatic Task Creation | ||
|
||
vscode-swift automatically adds tasks for common operations with your Package. | ||
|
||
> Tip: Tasks use workflows common to all VSCode extensions. For more information see https://code.visualstudio.com/docs/editor/tasks | ||
|
||
For workspaces that contain a **Package.swift** file, this extension will add the following tasks: | ||
|
||
- **Build All**: Build all targets in the Package | ||
- **Build Debug <Executable>**: Each executable in a Package.swift get a task for building a debug build | ||
- **Build Release <Executable>**: Each executable in a Package.swift get a task for building a release build | ||
|
||
These tasks are available via **Terminal ▸ Run Task...** and **Terminal ▸ Run Build Task...**. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Commands | ||
|
||
vscode-swift adds various commands to Visual Studio Code. | ||
|
||
The extension adds the following commands, available via the command palette. | ||
|
||
#### Configuration | ||
|
||
- **Create New Project...**: Create a new Swift project using a template. This opens a dialog to guide you through creating a new project structure. | ||
- **Create New Swift File...**: Create a new `.swift` file in the current workspace. | ||
- **Select Toolchain**: Select the locally installed Swift toolchain (including Xcode toolchains on macOS) that you want to use Swift tools from. | ||
|
||
The following command is only available on macOS: | ||
|
||
- **Select Target Platform**: This is an experimental command that offers code completion for iOS and tvOS projects. | ||
|
||
#### Building and Debugging | ||
|
||
- **Run Build**: Run `swift build` for the package associated with the open file. | ||
- **Debug Build**: Run `swift build` with debugging enabled for the package associated with the open file, launching the binary and attaching the debugger. | ||
- **Attach to Process...**: Attach the debugger to an already running process for debugging. | ||
- **Clean Build Folder**: Clean the build folder for the package associated with the open file, removing all previously built products. | ||
|
||
#### Dependency Management | ||
|
||
- **Resolve Package Dependencies**: Run `swift package resolve` on packages associated with the open file. | ||
- **Update Package Dependencies**: Run `swift package update` on packages associated with the open file. | ||
- **Reset Package Dependencies**: Run `swift package reset` on packages associated with the open file. | ||
- **Add to Workspace**: Add the current package to the active workspace in VS Code. | ||
- **Clean Build**: Run `swift package clean` on packages associated with the open file. | ||
- **Open Package.swift**: Open `Package.swift` for the package associated with the open file. | ||
- **Use Local Version**: Switch the package dependency to use a local version of the package instead of the remote repository version. | ||
- **Edit Locally**: Make the package dependency editable locally, allowing changes to the dependency to be reflected immediately. | ||
- **Revert To Original Version**: Revert the package dependency to its original, unedited state after local changes have been made. | ||
- **View Repository**: Open the external repository of the selected Swift package in a browser. | ||
|
||
#### Testing | ||
|
||
- **Test: Run All Tests**: Run all the tests across all test targes in the open project. | ||
- **Test: Rerun Last Run**: Perform the last test run again. | ||
- **Test: Open Coverage**: Open the last generated coverage report, if one exists. | ||
- **Test: Run All Tests in Parallel**: Run all tests in parallel. This action only affects XCTests. Swift-testing tests are parallel by default, and their parallelism [is controlled in code](https://developer.apple.com/documentation/testing/parallelization). | ||
|
||
#### Snippets and Scripts | ||
|
||
- **Insert Function Comment**: Insert a standard comment block for documenting a Swift function in the current file. | ||
- **Run Swift Script**: Run the currently open file, as a Swift script. The file must not be part of a build target. If the file has not been saved it will save it to a temporary file so it can be run. | ||
- **Run Swift Snippet**: If the currently open file is a Swift snippet then run it. | ||
- **Debug Swift Snippet**: If the currently open file is a Swift snippet then debug it. | ||
|
||
#### Diagnostics | ||
|
||
- **Capture VS Code Swift Diagnostic Bundle**: Capture a diagnostic bundle from VS Code, containing logs and information to aid in troubleshooting Swift-related issues. | ||
- **Clear Diagnostics Collection**: Clear all collected diagnostics in the current workspace to start fresh. | ||
- **Restart LSP Server**: Restart the Swift Language Server Protocol (LSP) server for the current workspace. | ||
- **Re-Index Project**: Force a re-index of the project to refresh code completion and symbol navigation support. |
File renamed without changes
File renamed without changes
File renamed without changes
matthewbastien marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Debugging | ||
|
||
vscode-swift allows you to debug your Swift packages. | ||
|
||
> Tip: Debugging works best when using a version of the Swift toolchain 6.0 or higher | ||
|
||
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. | ||
|
||
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. | ||
|
||
Debugging uses workflows common to all VSCode extensions. For more information see https://code.visualstudio.com/docs/editor/debugging |
File renamed without changes
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Installation | ||
|
||
vscode-code Swift is installed through the extension marketplace. | ||
|
||
The Swift extension is supported on macOS, Linux, and Windows. | ||
|
||
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Language Features | ||
|
||
vscode-swift provides various language features to help you write Swift code. | ||
|
||
The extension provides language features such as code completion and jump to definition via [SourceKit-LSP](https://github.com/apple/sourcekit-lsp). To ensure the extension functions correctly, it’s important to first build the project so that SourceKit-LSP has access to all the symbol data. Whenever you add a new dependency to your project, make sure to rebuild it so that SourceKit-LSP can update its information. |
File renamed without changes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Project View | ||
|
||
vscode-swift provides project view | ||
|
||
If your workspace contains a package, this extension will add a **Swift Project** view to the Explorer: | ||
|
||
 | ||
|
||
Additionally, the extension will monitor `Package.swift` and `Package.resolved` for changes, resolve any changes to the dependencies, and update the view as needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.