Add on_new_window setting (#63522)

> [!NOTE]
> This is a remake of #63335 as it's unlikely to be reopened just from
my
[mention](https://github.com/zed-industries/zed/pull/63335#issuecomment-5452544138).
Apologies for the noise!

# Objective

Closes #59368, where users (including me) are asking for a way to show
the Launchpad instead of an empty tab when opening a new window. As per
advice from
https://github.com/zed-industries/zed/issues/60720#issuecomment-4936162420,
adding a separate setting from `restore_on_startup` is more ideal.

`on_new_window` allows for two values:
- `empty_tab`
- `launchpad` (default)

## Testing

Added a regression test which opens a new window with `on_new_window`
set to `launchpad` and asserts that no item gets opened in the window's
pane. I've verified it fails without the setting gate, and confirmed
configuring this setting works manually (see Showcase).

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase


https://github.com/user-attachments/assets/bf339bd1-8c62-4243-ac9d-1045d1a14865

---

Release Notes:

- Added `on_new_window` setting to configure the opening of new windows.
This commit is contained in:
Albert Bogusz authored and GitHub committed 2026-09-02 18:17:30 +00:00
1 parent f15a5dac90
commit 7e7087a589
8 files changed
+145 -18

No files matched your search

+24
View File
@@ -3438,6 +3438,30 @@ If you wish to exclude certain hosts from using the proxy, set the `NO_PROXY` en
}
```
## On New Window
- Description: What to show when opening a new window.
- Setting: `on_new_window`
- Default: `"launchpad"`
**Options**
1. Show an empty untitled buffer:
```json [settings]
{
"on_new_window": "empty_tab"
}
```
2. Show the launchpad with recent projects:
```json [settings]
{
"on_new_window": "launchpad"
}
```
## Instrumentation
- Description: Configuration for developer-oriented instrumentation tools (profilers, tracers, etc.) that can be toggled at runtime.