docs: Apply documentation standards across all docs (#49177)
## Summary
Comprehensive remediation of 146 documentation files to align with Zed's
documentation conventions and brand voice guidelines.
## Changes
### YAML Frontmatter
- Added `title` and `description` frontmatter to all docs missing it
### Settings UI Pattern
- Updated 48+ files to show Settings Editor before JSON examples
- Pattern: `Configure X in Settings ({#kb zed::OpenSettings}), or add to
your settings file:`
- Added `([how to edit](./configuring-zed.md#settings-files))` links for
JSON-only settings
### Brand Voice Fixes
- Removed exclamation points (command-palette, key-bindings, repl,
privacy-and-security, etc.)
- Simplified em dash chains to parentheticals (environment,
troubleshooting, agent-panel, etc.)
- Fixed marketing language (yarn.md intro, development/linux.md)
### Terminology Alignment
- `settings UI` -> `Settings Editor`
- `sidebar` -> specific panel names (Project Panel, Collab Panel)
- `directory` -> `folder` in non-technical contexts
- `workspace` -> `project` in non-LSP contexts
- `Command Palette` -> `command palette` (lowercase)
### Callout Standardization
- Converted various callout formats to standard `> **Note:**` pattern
## Related
Depends on conventions established in #49176.
Release Notes:
- N/A
This commit is contained in:
1 parent
9743fe7dfd
commit
6daa541e77
142 files changed
+1947
-489
No files matched your search
@@ -1,8 +1,13 @@
|
||||
---
|
||||
title: Building Zed for Linux
|
||||
description: "Guide to building zed for linux for Zed development."
|
||||
---
|
||||
|
||||
# Building Zed for Linux
|
||||
|
||||
## Repository
|
||||
|
||||
Clone down the [Zed repository](https://github.com/zed-industries/zed).
|
||||
Clone the [Zed repository](https://github.com/zed-industries/zed).
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -18,9 +23,9 @@ Clone down the [Zed repository](https://github.com/zed-industries/zed).
|
||||
|
||||
### Linkers {#linker}
|
||||
|
||||
On Linux, Rust's default linker is [LLVM's `lld`](https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/). Alternative linkers, especially [Wild](https://github.com/davidlattimore/wild) and [Mold](https://github.com/rui314/mold) can significantly improve clean and incremental build time.
|
||||
On Linux, Rust's default linker is [LLVM's `lld`](https://blog.rust-lang.org/2025/09/18/Rust-1.90.0/). Alternative linkers, especially [Wild](https://github.com/davidlattimore/wild) and [Mold](https://github.com/rui314/mold), can improve clean and incremental build times.
|
||||
|
||||
At present Zed uses Mold in CI because it's more mature. For local development Wild is recommended because it's 5-20% faster than Mold.
|
||||
Zed currently uses Mold in CI because it is more mature. For local development, Wild is recommended because it is typically 5-20% faster than Mold.
|
||||
|
||||
These linkers can be installed with `script/install-mold` and `script/install-wild`.
|
||||
|
||||
@@ -73,7 +78,7 @@ You can install a local build on your machine with:
|
||||
./script/install-linux
|
||||
```
|
||||
|
||||
This will build zed and the cli in release mode and make them available at `~/.local/bin/zed`, installing .desktop files to `~/.local/share`.
|
||||
This builds `zed` and the `cli` in release mode, installs the binary at `~/.local/bin/zed`, and installs `.desktop` files to `~/.local/share`.
|
||||
|
||||
> **_Note_**: If you encounter linker errors similar to the following:
|
||||
>
|
||||
@@ -92,12 +97,12 @@ This will build zed and the cli in release mode and make them available at `~/.l
|
||||
> ```
|
||||
>
|
||||
> **Cause**:
|
||||
> this is caused by known bugs in aws-lc-rs(doesn't support GCC >= 14): [FIPS fails to build with GCC >= 14](https://github.com/aws/aws-lc-rs/issues/569)
|
||||
> This is caused by known bugs in aws-lc-rs (no GCC >= 14 support): [FIPS fails to build with GCC >= 14](https://github.com/aws/aws-lc-rs/issues/569)
|
||||
> & [GCC-14 - build failure for FIPS module](https://github.com/aws/aws-lc/issues/2010)
|
||||
>
|
||||
> You can refer to [linux: Linker error for remote_server when using script/install-linux](https://github.com/zed-industries/zed/issues/24880) for more information.
|
||||
>
|
||||
> **Workarounds**:
|
||||
> **Workaround**:
|
||||
> Set the remote server target to `x86_64-unknown-linux-gnu` like so `export REMOTE_SERVER_TARGET=x86_64-unknown-linux-gnu; script/install-linux`
|
||||
|
||||
## Wayland & X11
|
||||
@@ -106,7 +111,7 @@ Zed supports both X11 and Wayland. By default, we pick whichever we can find at
|
||||
|
||||
## Notes for packaging Zed
|
||||
|
||||
Thank you for taking on the task of packaging Zed!
|
||||
This section is for distribution maintainers packaging Zed.
|
||||
|
||||
### Technical requirements
|
||||
|
||||
@@ -122,16 +127,14 @@ Zed has two main binaries:
|
||||
|
||||
### Other things to note
|
||||
|
||||
At Zed, our priority has been to move fast and bring the latest technology to our users. We've long been frustrated at having software that is slow, out of date, or hard to configure, and so we've built our editor to those tastes.
|
||||
Zed moves quickly, and distribution maintainers often have different constraints and priorities. The points below describe current trade-offs:
|
||||
|
||||
However, we realize that many distros have other priorities. We want to work with everyone to bring Zed to their favorite platforms. But there is a long way to go:
|
||||
|
||||
- Zed is a fast-moving early-phase project. We typically release 2-3 builds per week to fix user-reported issues and release major features.
|
||||
- Zed is a fast-moving project. We typically publish 2-3 builds per week to address reported issues and ship larger changes.
|
||||
- There are a couple of other `zed` binaries that may be present on Linux systems ([1](https://openzfs.github.io/openzfs-docs/man/v2.2/8/zed.8.html), [2](https://zed.brimdata.io/docs/commands/zed)). If you want to rename our CLI binary because of these issues, we suggest `zedit`, `zeditor`, or `zed-cli`.
|
||||
- Zed automatically installs the correct version of common developer tools in the same way as rustup/rbenv/pyenv, etc. We understand this is contentious, [see here](https://github.com/zed-industries/zed/issues/12589).
|
||||
- We allow users to install extensions locally and from [zed-industries/extensions](https://github.com/zed-industries/extensions). These extensions may install further tooling as needed, such as language servers. In the long run, we would like to make this safer, [see here](https://github.com/zed-industries/zed/issues/12358).
|
||||
- Zed automatically installs versions of common developer tools, similar to rustup/rbenv/pyenv. This behavior is discussed [here](https://github.com/zed-industries/zed/issues/12589).
|
||||
- Users can install extensions locally and from [zed-industries/extensions](https://github.com/zed-industries/extensions). Extensions may install additional tools such as language servers. Planned safety improvements are tracked [here](https://github.com/zed-industries/zed/issues/12358).
|
||||
- Zed connects to several online services by default (AI, telemetry, collaboration). AI and our telemetry can be disabled by your users with their zed settings or by patching our [default settings file](https://github.com/zed-industries/zed/blob/main/assets/settings/default.json).
|
||||
- As a result of the above issues, zed currently does not play nice with sandboxes, [see here](https://github.com/zed-industries/zed/pull/12006#issuecomment-2130421220)
|
||||
- Because of the points above, Zed currently does not work well with sandboxes. See [this discussion](https://github.com/zed-industries/zed/pull/12006#issuecomment-2130421220).
|
||||
|
||||
## Flatpak
|
||||
|
||||
@@ -163,21 +166,21 @@ When this zed instance is exited, terminal output will include a command to run
|
||||
|
||||
## Perf recording
|
||||
|
||||
How to get a flamegraph with resolved symbols from a running zed instance. Use
|
||||
when zed is using a lot of CPU. Not useful for hangs.
|
||||
How to get a flamegraph with resolved symbols from a running Zed instance.
|
||||
Use this when Zed is using a lot of CPU. It is not useful for hangs.
|
||||
|
||||
### During the incident
|
||||
|
||||
- Find the PID (process ID) using:
|
||||
`ps -eo size,pid,comm | grep zed | sort | head -n 1 | cut -d ' ' -f 2`
|
||||
Or find the pid of the command zed-editor with the most ram usage in something
|
||||
Or find the PID of `zed-editor` with the highest RAM usage in something
|
||||
like htop/btop/top.
|
||||
|
||||
- Install perf:
|
||||
On Ubuntu (derivatives) run `sudo apt install linux-tools`.
|
||||
|
||||
- Perf Record:
|
||||
run `sudo perf record -p <pid you just found>`, wait a few seconds to gather data then press Ctrl+C. You should now have a perf.data file
|
||||
- Perf record:
|
||||
Run `sudo perf record -p <pid you just found>`, wait a few seconds to gather data, then press Ctrl+C. You should now have a `perf.data` file.
|
||||
|
||||
- Make the output file user owned:
|
||||
run `sudo chown $USER:$USER perf.data`
|
||||
@@ -185,7 +188,7 @@ when zed is using a lot of CPU. Not useful for hangs.
|
||||
- Get build info:
|
||||
Run zed again and type `zed: about` in the command pallet to get the exact commit.
|
||||
|
||||
The `data.perf` file can be send to zed together with the exact commit.
|
||||
The `perf.data` file can be sent to Zed together with the exact commit.
|
||||
|
||||
### Later
|
||||
|
||||
@@ -193,7 +196,7 @@ This can be done by Zed staff.
|
||||
|
||||
- Build Zed with symbols:
|
||||
Check out the commit found previously and modify `Cargo.toml`.
|
||||
Apply the following diff then make a release build.
|
||||
Apply the following diff, then make a release build.
|
||||
|
||||
```diff
|
||||
[profile.release]
|
||||
@@ -201,8 +204,8 @@ This can be done by Zed staff.
|
||||
+debug = "full"
|
||||
```
|
||||
|
||||
- Add the symbols to perf database:
|
||||
`pref buildid-cache -v -a <path to release zed binary>`
|
||||
- Add the symbols to the perf database:
|
||||
`perf buildid-cache -v -a <path to release zed binary>`
|
||||
|
||||
- Resolve the symbols from the db:
|
||||
`perf inject -i perf.data -o perf_with_symbols.data`
|
||||
|
||||
Reference in new issue
Block a user