适用于 Windows 的 Zed 编辑器的非官方稳定版。通过 scoop 或 pwsh 脚本轻松安装。不隶属于 Zed Industries

ops/2025/2/9 6:10:19/

一、软件介绍(文末提供下载)

 Zed,这是一款由 Atom 和 Tree-sitter 的创建者提供的高性能多人 Atom and Tree-sitter.。

二、macOS 和 Linux安装

在 macOS 和 Linux 上,您可以直接下载 Zed 或通过本地包管理器安装 Zed。

本地包下载地址:

夸克网盘分享

三、windows安装构建适用于 Windows 的 Zed

Repository 存储 库

Clone down the Zed repository.
克隆 Zed 存储库。

Dependencies 依赖

  • Install rustup 安装 rustup

  • Install Visual Studio with the optional components MSVC v*** - VS YYYY C++ x64/x86 build tools and MSVC v*** - VS YYYY C++ x64/x86 Spectre-mitigated libs (latest) (v*** is your VS version and YYYY is year when your VS was released. Pay attention to the architecture and change it to yours if needed.)
    使用可选组件 MSVC v*** - VS YYYY C++ x64/x86 build tools 安装 Visual Studio, MSVC v*** - VS YYYY C++ x64/x86 Spectre-mitigated libs (latest) 并且 ( v*** 是您的 VS 版本, YYYY 是 VS 发布的年份。注意架构,并在需要时将其更改为您的架构。

  • Install Windows 11 or 10 SDK depending on your system, but ensure that at least Windows 10 SDK version 2104 (10.0.20348.0) is installed on your machine. You can download it from the Windows SDK Archive
    根据您的系统安装 Windows 11 或 10 SDK,但请确保您的计算机上至少 Windows 10 SDK version 2104 (10.0.20348.0) 安装了 Windows 11 或 10 SDK。您可以从 Windows SDK 存档下载

  • Install CMake (required by a dependency). Or you can install it through Visual Studio Installer, then manually add the bin directory to your PATH, for example: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin.
    安装 CMake(依赖项需要)。或者您可以通过 Visual Studio 安装程序安装它,然后手动将 bin 目录添加到您的 PATH ,例如: C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin 。

If you can't compile Zed, make sure that you have at least the following components installed:
如果您无法编译 Zed,请确保您至少安装了以下组件:

{
  "version": "1.0",
  "components": [
    "Microsoft.VisualStudio.Component.CoreEditor",
    "Microsoft.VisualStudio.Workload.CoreEditor",
    "Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
    "Microsoft.VisualStudio.ComponentGroup.WebToolsExtensions.CMake",
    "Microsoft.VisualStudio.Component.VC.CMake.Project",
    "Microsoft.VisualStudio.Component.Windows11SDK.26100",
    "Microsoft.VisualStudio.Component.VC.Runtimes.x86.x64.Spectre"
  ],
  "extensions": []
}

The list can be obtained as follows:
该列表可以按如下方式获取:

  • Open the Visual Studio Installer
    打开 Visual Studio 安装程序

  • Click on More in the Installed tab
    点击标签 More 页中的 Installed

  • Click on Export configuration  Export configuration 点击

Backend dependencies 后端依赖项

This section is still in development. The instructions are not yet complete.
此部分仍在开发中。说明尚未完成。

If you are developing collaborative features of Zed, you'll need to install the dependencies of zed's collab server:
如果您正在开发 Zed 的协作功能,则需要安装 zed collab 服务器的依赖项:

  • Install Postgres 安装 Postgres

  • Install Livekit, optionally you can add the livekit-server binary to your PATH.
    安装 Livekit,您可以选择将 livekit-server 二进制文件添加到您的 PATH .

Alternatively, if you have Docker installed you can bring up all the collab dependencies using Docker Compose:
或者,如果您安装了 Docker,则可以使用 Docker Compose 启动所有 collab 依赖项:

docker compose up -d

Notes

You should modify the pg_hba.conf file in the data directory to use trust instead of scram-sha-256 for the host method. Otherwise, the connection will fail with the error password authentication failed. The pg_hba.conf file typically locates at C:\Program Files\PostgreSQL\17\data\pg_hba.conf. After the modification, the file should look like this:
您应该修改 pg_hba.conf data 目录中的文件 to use trust 而不是 scram-sha-256 for host the method。否则,连接将失败并显示错误 password authentication failed 。 pg_hba.conf 该文件通常位于 C:\Program Files\PostgreSQL\17\data\pg_hba.conf 。修改后,文件应如下所示:

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code># IPv4 local connections:
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 trust
</code></span></span></span></span>

Also, if you are using a non-latin Windows version, you must modify thelc_messages parameter in the postgresql.conf file in the data directory to English_United States.1252 (or whatever UTF8-compatible encoding you have). Otherwise, the database will panic. The postgresql.conf file should look like this:
此外,如果您使用的是非拉丁 Windows 版本,则必须将 data 目录中 postgresql.conf 文件中的 lc_messages 参数修改为 English_United States.1252 (或您拥有的任何 UTF8 兼容编码)。否则,数据库将出现 panic。该文件 postgresql.conf 应如下所示:

<span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><span style="color:#1f2328"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code># lc_messages = 'Chinese (Simplified)_China.936' # locale for system error message strings
lc_messages = 'English_United States.1252'
</code></span></span></span></span>

After this, you should restart the postgresql service. Press the win key + R to launch the Run window. Type the services.msc and hit the OK button to open the Services Manager. Then, find the postgresql-x64-XX service, right-click on it, and select Restart.
在此之后,您应该重新启动 postgresql 该服务。按 + win R 键启动 Run 窗口。键入 services.msc 并点击 OK 按钮以打开服务管理器。然后,找到该服务 postgresql-x64-XX ,右键单击它,然后选择 Restart 。

Building from source 从源构建

Once you have the dependencies installed, you can build Zed using Cargo.
安装依赖项后,您可以使用 Cargo 构建 Zed。

For a debug build:
对于调试版本:

cargo run

For a release build:
对于发布版本:

cargo run --release

And to run the tests:
要运行测试,请执行以下作:

cargo test --workspace

Installing from msys2 从 msys2 安装

MSYS2 distribution provides Zed as a package mingw-w64-zed. The package is available for UCRT64, MINGW64 and CLANG64 repositories. To download it, run
MSYS2 发行版以 mingw-w64-zed 包的形式提供 Zed。该软件包可用于 UCRT64、MINGW64 和 CLANG64 存储库。要下载它,请运行

pacman -Syu
pacman -S $MINGW_PACKAGE_PREFIX-zed

then you can run zed in a shell.
然后,您可以在 shell zed 中运行。

You can see the build script for more details on build process.
有关构建过程的更多详细信息,您可以查看构建脚本。

Please, report any issue in msys2/MINGW-packages/issues first.
请先在 msys2/MINGW-packages/issues 中报告任何问题。

Note that collab is not supported for msys2.
请注意,msys2 不支持此功能 collab 。

如果碰到问题,详情参考zed/docs/src/development/windows.md at main · zed-industries/zed · GitHub


http://www.ppmy.cn/ops/156906.html

相关文章

003 Linux驱动开发——第一个简单开发实验

01 开发板的第 1 个 APP 实验 gcc -o hello hello.c ./hello Hello, world! ./hello weidongshan Hello, weidongshan!要想给 ARM 板编译出 hello 程序&#xff0c;需要使用交叉编译工具链 arm-buildroot-linux-gnueabihf-gcc -o hello hello.c 这样编译出来的 hello 程序才可以…

如何在Windows上使用Docker

引言 WSL2&#xff08;Windows Subsystem for Linux2&#xff09;是微软开发的一种技术&#xff0c;允许在 Windows 操作系统上运行 Linux 环境。它提供了一个兼容层&#xff0c;使得用户可以在 Windows 系统中直接运行 Linux 命令行工具、应用程序和开发工具&#xff0c;而无需…

【学术投稿-第五届消费电子与计算机工程国际学术会议】HTML核心元素详解:超链接、列表、表格与实用技巧

基本信息 大会官网&#xff1a;www.iccece.org 线下召开时间&#xff1a;2025年2月28-3月2日 目录 前言 一、超链接&#xff1a;连接万物的桥梁 1. 基础语法 2. 高级应用 3.代码案例​编辑 4. 注意事项 二、列表&#xff1a;结构化内容的利器 1. 有序列表&#xff08;O…

边缘计算网关驱动智慧煤矿智能升级——实时预警、低延时决策与数字孪生护航矿山安全高效运营

迈向智能化煤矿管理新时代 工业物联网和边缘计算技术的迅猛发展&#xff0c;煤矿安全生产与高效运营正迎来全新变革。传统煤矿监控模式由于现场环境复杂、数据采集和传输延时较高&#xff0c;已难以满足当下高标准的安全管理要求。为此&#xff0c;借助边缘计算网关的实时数据…

ubuntu中 使用C++ FFmpeg拉取RTSP视频流

在C中使用FFmpeg拉取RTSP视频流涉及多个步骤&#xff0c;包括初始化FFmpeg库、打开RTSP流、读取帧数据等。以下是一个简单的示例代码&#xff0c;展示如何使用FFmpeg库拉取RTSP视频流并解码视频帧。 1. 安装FFmpeg库 首先&#xff0c;确保你已经安装了FFmpeg库。你可以通过以…

全面的生成式语言模型学习路线

设计了一套全面的生成式语言模型学习路线&#xff0c;包含基础储备、核心知识学习、实践应用和进阶提升四个阶段&#xff0c;你可以根据自身情况进行调整。 第一阶段&#xff1a;基础储备&#xff08;1 - 2个月&#xff09; 数学基础 线性代数 学习向量、矩阵的基本运算&…

腾讯社招流程记录

bg&#xff1a;24届985硕士&#xff0c;四个多月被裁&#xff0c;后端开发 12.20上午投递&#xff0c;腾讯csig云计算后台 12.20下午约面 12.24晚上一面 1h45min 12.26中午约二面 12.26晚上二面 1h10min 目前状态还在面试流程中 ---------------------- 三面还没约&#xff0…

缓存的今生今世

缓存是什么 了解缓存&#xff0c;首先要了解内存概念&#xff0c;毕竟缓存离不开内存。 内存又称内部存储器和主存储器(RAM)&#xff0c;内存条由内存芯片、电路板、金手指等部分组成。它与CPU之间的连通是通过总线完成&#xff0c;是CPU与外存的连通桥梁。计算机里所有的运算…