Skip to content

Add toolchain version picker #1674

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 5 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Added

- Add clickable toolchain selection to Swift version status bar item ([#1674](https://github.com/swiftlang/vscode-swift/pull/1674))
- Add macOS support for Swiftly toolchain management ([#1673](https://github.com/swiftlang/vscode-swift/pull/1673))
- Show revision hash or local/editing keyword in project panel dependency descriptions ([#1667](https://github.com/swiftlang/vscode-swift/pull/1667))

Expand Down
3 changes: 3 additions & 0 deletions src/ui/LanguageStatusItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import * as vscode from "vscode";
import { Command } from "vscode-languageclient";
import { WorkspaceContext, FolderOperation } from "../WorkspaceContext";
import { LanguagerClientDocumentSelectors } from "../sourcekit-lsp/LanguageClientConfiguration";
import { Commands } from "../commands";

export class LanguageStatusItems implements vscode.Disposable {
constructor(workspaceContext: WorkspaceContext) {
Expand All @@ -31,6 +32,8 @@ export class LanguageStatusItems implements vscode.Disposable {
label: `Swift Version ${toolchain.swiftVersion.toString()}`,
};

swiftVersionItem.command = Command.create("Select Toolchain", Commands.SELECT_TOOLCHAIN);

// Package.swift item
const packageSwiftItem = vscode.languages.createLanguageStatusItem("swiftlang-package", [
...LanguagerClientDocumentSelectors.appleLangDocumentSelector,
Expand Down