Files
Neo-ZQYY/tools/cursor/install_vscode_insiders_extensions.ps1
2026-05-02 03:11:39 +08:00

37 lines
1.5 KiB
PowerShell
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 从 VSCode Insiders 迁移到 Cursor 的扩展补装脚本
# 自动生成;安装旧 VSCode Insiders 中已安装但 Cursor 当前缺失的扩展。
# 旧环境 disabled 状态见 docs/ai-env-history/vscode_insiders_extensions.csvCursor 无稳定 CLI 持久禁用接口,需在 UI 中按清单确认。
$ErrorActionPreference = 'Continue'
$cursor = 'cursor'
$timeoutSec = 90
$extensions = @(
"leizongmin.node-module-intellisense"
"meezilla.json"
"ms-dotnettools.csdevkit"
"ms-dotnettools.csharp"
"ms-python.vscode-pylance"
"ms-vscode-remote.remote-ssh"
"ms-vscode-remote.remote-ssh-edit"
"ms-vscode.remote-explorer"
)
foreach ($ext in $extensions) {
Write-Host "Installing $ext ..."
$p = Start-Process -FilePath $cursor -ArgumentList @('--install-extension', $ext) -NoNewWindow -PassThru -Wait:$false
if (-not $p.WaitForExit($timeoutSec * 1000)) {
Write-Warning "Timeout installing $ext; killing process and continuing."
try { Stop-Process -Id $p.Id -Force } catch {}
continue
}
Write-Host "Finished $ext exit=$($p.ExitCode)"
}
# 以下扩展在 VSCode Insiders 同步状态中为 disabled安装后建议在 Cursor UI 中禁用:
# disabled-before: leizongmin.node-module-intellisense
# disabled-before: ms-dotnettools.csdevkit
# disabled-before: ms-dotnettools.csharp
# disabled-before: ms-python.vscode-pylance
# disabled-before: ms-vscode-remote.remote-ssh
# disabled-before: ms-vscode-remote.remote-ssh-edit
# disabled-before: ms-vscode.remote-explorer