CONTRIBUTING.md

  1# Contributing to Zed
  2
  3Thank you for helping us make Zed better!
  4
  5All activity in Zed forums is subject to our [Code of
  6Conduct](https://zed.dev/code-of-conduct). Additionally, contributors must sign
  7our [Contributor License Agreement](https://zed.dev/cla) before their
  8contributions can be merged.
  9
 10## Contribution ideas
 11
 12Zed is a large project with a number of priorities. We spend most of
 13our time working on what we believe the product needs, but we also love working
 14with the community to improve the product in ways we haven't thought of (or had time to get to yet!)
 15
 16In particular we love PRs that are:
 17
 18- Fixing or extending the docs.
 19- Fixing bugs.
 20- Small enhancements to existing features to make them work for more people (making things work on more platforms/modes/whatever).
 21- Small extra features, like keybindings or actions you miss from other editors or extensions.
 22- Part of a Community Program like [Let's Git Together](https://github.com/zed-industries/zed/issues/41541).
 23
 24If you're looking for concrete ideas:
 25
 26- [Triaged bugs with confirmed steps to reproduce](https://github.com/zed-industries/zed/issues?q=is%3Aissue%20state%3Aopen%20type%3ABug%20label%3Astate%3Areproducible).
 27- [Area labels](https://github.com/zed-industries/zed/labels?q=area%3A*) to browse bugs in a specific part of the product you care about (after clicking on an area label, add type:Bug to the search).
 28
 29If you're thinking about proposing or building a larger feature, read the [Zed Feature Process](./docs/src/development/feature-process.md) for how we think about feature design — what context to provide, what integration points to consider, and how to put together a strong proposal.
 30
 31## Sending changes
 32
 33The Zed culture values working code and synchronous conversations over long
 34discussion threads.
 35
 36The best way to get us to take a look at a proposed change is to send a pull
 37request. We will get back to you (though this sometimes takes longer than we'd
 38like, sorry).
 39
 40Although we will take a look, we tend to only merge about half the PRs that are
 41submitted. If you'd like your PR to have the best chance of being merged:
 42
 43- Make sure the change is **desired**: we're always happy to accept bugfixes,
 44  but features should be confirmed with us first if you aim to avoid wasted
 45  effort. If there isn't already a GitHub issue for your feature with staff
 46  confirmation that we want it, start with a GitHub discussion rather than a PR.
 47- Include a clear description of **what you're solving**, and why it's important.
 48- Include **tests**. For UI changes, consider updating visual regression tests (see [Building Zed for macOS](./docs/src/development/macos.md#visual-regression-tests)).
 49- If it changes the UI, attach **screenshots** or screen recordings.
 50- Make the PR about **one thing only**, e.g. if it's a bugfix, don't add two
 51  features and a refactoring on top of that.
 52- Keep AI assistance under your judgement and responsibility: it's unlikely
 53  we'll merge a vibe-coded PR that the author doesn't understand.
 54
 55The internal advice for reviewers is as follows:
 56
 57- If the fix/feature is obviously great, and the code is great. Hit merge.
 58- If the fix/feature is obviously great, and the code is nearly great. Send PR comments, or offer to pair to get things perfect.
 59- If the fix/feature is not obviously great, or the code needs rewriting from scratch. Close the PR with a thank you and some explanation.
 60
 61If you need more feedback from us: the best way is to be responsive to
 62Github comments, or to offer up time to pair with us.
 63
 64If you need help deciding how to fix a bug, or finish implementing a feature
 65that we've agreed we want, please open a PR early so we can discuss how to make
 66the change with code in hand.
 67
 68### UI/UX checklist
 69
 70When your changes affect UI, consult this checklist:
 71
 72**Accessibility / Ergonomics**
 73- Do all keyboard shortcuts work as intended?
 74- Are shortcuts discoverable (tooltips, menus, docs)?
 75- Do all mouse actions work (drag, context menus, resizing, scrolling)?
 76- Does the feature look great in light mode and dark mode?
 77- Are hover states, focus rings, and active states clear and consistent?
 78- Is it usable without a mouse (keyboard-only navigation)?
 79
 80**Responsiveness**
 81- Does the UI scale gracefully on:
 82    - Narrow panes (e.g., side-by-side split views)?
 83    - Short panes (e.g., laptops with 13" displays)?
 84    - High-DPI / Retina displays?
 85- Does resizing panes or windows keep the UI usable and attractive?
 86- Do dialogs or modals stay centered and within viewport bounds?
 87
 88**Platform Consistency**
 89- Is the feature fully usable on Windows, Linux, and Mac?
 90- Does it respect system-level settings (fonts, scaling, input methods)?
 91
 92**Performance**
 93- All user interactions must have instant feedback.
 94    - If the user requests something slow (e.g. an LLM generation) there should be some indication of the work in progress.
 95- Does it handle large files, big projects, or heavy workloads without degrading?
 96- Frames must take no more than 8ms (120fps)
 97
 98**Consistency**
 99- Does it match Zed’s design language (spacing, typography, icons)?
100- Are terminology, labels, and tone consistent with the rest of Zed?
101- Are interactions consistent (e.g., how tabs close, how modals dismiss, how errors show)?
102
103**Internationalization & Text**
104- Are strings concise, clear, and unambiguous?
105- Do we avoid internal Zed jargon that only insiders would know?
106
107**User Paths & Edge Cases**
108- What does the happy path look like?
109- What does the unhappy path look like? (errors, rejections, invalid states)
110- How does it work in offline vs. online states?
111- How does it work in unauthenticated vs. authenticated states?
112- How does it behave if data is missing, corrupted, or delayed?
113- Are error messages actionable and consistent with Zed’s voice?
114
115**Discoverability & Learning**
116- Can a first-time user figure it out without docs?
117- Is there an intuitive way to undo/redo actions?
118- Are power features discoverable but not intrusive?
119- Is there a path from beginner → expert usage (progressive disclosure)?
120
121
122## Things we will (probably) not merge
123
124Although there are few hard and fast rules, typically we don't merge:
125
126- Anything that can be provided by an extension. For example a new language, or theme. For adding themes or support for a new language to Zed, check out our [docs on developing extensions](https://zed.dev/docs/extensions/developing-extensions).
127- New file icons. Zed's default icon theme consists of icons that are hand-designed to fit together in a cohesive manner, please don't submit PRs with off-the-shelf SVGs.
128- Features where (in our subjective opinion) the extra complexity isn't worth it for the number of people who will benefit.
129- Giant refactorings.
130- Non-trivial changes with no tests.
131- Stylistic code changes that do not alter any app logic. Reducing allocations, removing `.unwrap()`s, fixing typos is great; making code "more readable" — maybe not so much.
132- Anything that seems AI-generated without understanding the output.
133
134## Bird's-eye view of Zed
135
136We suggest you keep the [Zed glossary](docs/src/development/glossary.md) at your side when starting out. It lists and explains some of the structures and terms you will see throughout the codebase.
137
138Zed is made up of several smaller crates - let's go over those you're most likely to interact with:
139
140- [`gpui`](/crates/gpui) is a GPU-accelerated UI framework which provides all of the building blocks for Zed. **We recommend familiarizing yourself with the root level GPUI documentation.**
141- [`editor`](/crates/editor) contains the core `Editor` type that drives both the code editor and all various input fields within Zed. It also handles a display layer for LSP features such as Inlay Hints or code completions.
142- [`project`](/crates/project) manages files and navigation within the filetree. It is also Zed's side of communication with LSP.
143- [`workspace`](/crates/workspace) handles local state serialization and groups projects together.
144- [`vim`](/crates/vim) is a thin implementation of Vim workflow over `editor`.
145- [`lsp`](/crates/lsp) handles communication with external LSP server.
146- [`language`](/crates/language) drives `editor`'s understanding of language - from providing a list of symbols to the syntax map.
147- [`collab`](/crates/collab) is the collaboration server itself, driving the collaboration features such as project sharing.
148- [`rpc`](/crates/rpc) defines messages to be exchanged with collaboration server.
149- [`theme`](/crates/theme) defines the theme system and provides a default theme.
150- [`ui`](/crates/ui) is a collection of UI components and common patterns used throughout Zed.
151- [`cli`](/crates/cli) is the CLI crate which invokes the Zed binary.
152- [`zed`](/crates/zed) is where all things come together, and the `main` entry point for Zed.
153
154## Packaging Zed
155
156Check our [notes for packaging Zed](https://zed.dev/docs/development/linux#notes-for-packaging-zed).