Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flow.Plugin.VSCodeWorkspace

A plugin for Flow Launcher that allows you to quickly open the recent workspaces of VS Code and VSCodium.

image

Features

  • 🔍 搜索最近打开的本地工作区 — 自动读取 VS Code / VSCodium 的历史记录,快速定位并打开最近使用过的文件夹或 .code-workspace 工作区文件。
  • 🖥️ 远程工作区支持 — 支持 WSL、SSH、Dev Containers、Codespaces 等远程环境(通过 vscode-remote:// URI 识别)。
  • 📁 打开所在文件夹 — 在结果上按住 Ctrl 回车可直接在资源管理器中打开对应目录。
  • ⚙️ 额外自定义工作区 — 在插件设置中手动添加 file:/// URI 或远程 URI,作为内置历史的补充。
  • 🧩 多实例自动识别 — 自动发现并区分 VS Code(Stable / Insiders / Exploration)与 VSCodium(Stable / Insiders),每个实例独立读取各自的历史记录。
  • 🗂️ 远程机器直连 — 自动解析 SSH config,直接打开远程主机(可选,在设置中开关)。

Usage

默认动作关键词(Action Keyword)为 {。在 Flow Launcher 中输入关键词后即可看到最近的工作区列表。

例如输入 { 后按项目名继续过滤即可定位到对应工作区。

快捷操作

操作 效果
Enter 用对应编辑器(VS Code / VSCodium)打开该工作区
Ctrl + Enter 在文件资源管理器中打开工作区所在文件夹

设置项

在 Flow Launcher 插件设置中找到「VS Code Workspaces」进入配置:

  • Discover Workspaces — 是否自动读取编辑器最近打开的工作区记录。
  • Discover Machines — 是否从 SSH config 中解析并展示可直连的远程机器。
  • 额外文件夹 URI — 手动添加的自定义工作区 URI 列表。

Supported Editors

插件通过扫描 PATH 及常见安装目录自动发现以下编辑器实例:

  • VS Code(Stable / Insiders / Exploration)
  • VSCodium(Stable / Insiders)— VSCodium 作为 VS Code 的 OSS 构建,其历史记录存储于 .vscode-oss-shared 共享存储,插件已针对性地兼容。

Build & Development

环境要求

  • .NET SDK 7.0 或更高版本
  • Windows(插件基于 net7.0-windows,使用 WPF)

本地编译

# 调试构建
dotnet build --configuration Debug

# 发布构建
dotnet build --configuration Release

构建产物默认输出到:

  • Debug:Output\Debug\VSCodeWorkspaces\
  • Release:Output\Release\VSCodeWorkspaces\net7.0-windows\

本地调试

Output\Debug\VSCodeWorkspaces\(或 Release 输出目录)整个复制到 Flow Launcher 的 Plugins 目录下,重启 Flow Launcher 即可加载插件。

Release(版本发布)

发布流程由 release.ps1 一键驱动:确认/更新版本 → 构建打包 → 创建 tag → push → GitHub Actions 自动发布

版本号来源是 plugin.jsonVersion 字段(如 1.5.1)。

发布步骤(推荐)

在项目根目录执行:

.\release.bat

或直接运行 PowerShell 脚本:

powershell.exe -ExecutionPolicy Bypass -File .\release.ps1

交互流程

脚本运行后会引导你完成以下步骤:

  1. 读取当前版本:显示 plugin.json 中的当前版本号。
  2. 确认或更新版本
    • 直接按 Enter 保持当前版本;
    • 或输入新的版本号(如 1.6.0),脚本会自动更新 plugin.jsonVersion 字段并提交该变更。
  3. 构建并打包:执行 dotnet build --configuration Release,生成 VSCodeWorkspaces-v{Version}.zip
  4. 创建 git tag:自动创建 v{Version} 标签(若已存在会报错中止)。
  5. push 到 GitHub:同时推送当前分支与 tag。

GitHub Actions 自动发布

推送 v*.*.* 格式的 tag 后,会触发 .github/workflows/publish.yml

  • 从 tag 快照的 plugin.json 读取版本号。
  • 执行 dotnet publish 并打包为 ZIP。
  • 通过 softprops/action-gh-release 创建 GitHub Release 并上传 ZIP。

因此发布全程无需手动创建 Release——只要 push tag 即可。

注意:publish.yml 需要 contents: write 权限才能创建 Release(已配置 permissions.contents.write)。若遇到 403,请在仓库 Settings → Actions → General → Workflow permissions 中开启 "Read and write permissions"

脚本做了什么

  • 读取 / 校验 / 更新 plugin.json 版本号。
  • 删除同版本号的旧 ZIP(避免覆盖冲突)。
  • 执行 dotnet build --configuration Release
  • 将插件文件(dll、Images、plugin.json 等)直接压入 ZIP 根目录(不包含多余的目录层级),便于 Flow Launcher 直接解压使用。
  • 创建 tag 并 push,触发 GitHub Actions 自动发布。

提示:压缩包内应直接包含 plugin.jsonFlow.Plugin.VSCodeWorkspaces.dllImages\ 等文件(没有外层文件夹),这样用户解压到 Plugins 目录即可正常加载。

手动发布(备选)

如不使用脚本,也可手动操作:

  1. plugin.json 中更新 Version 字段并提交。
  2. 构建 Release 并打包 ZIP。
  3. 创建 tag v{Version} 并 push:
    git tag -a v1.6.0 -m "Release v1.6.0"
    git push origin v1.6.0
  4. 等待 GitHub Actions 自动生成 Release。

Acknowledgements

The original source code is from Microsoft PowerToys.

Hope you enjoy it!

About

VSCode workspace access plugin for Flow Launcher

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages