zed/docs/src
K4YT3X 2c0d6c067d
project_panel: Add horizontal scroll setting (#51143)
This PR introduces the `project_panel.scrollbar.horizontal_scroll`
setting to allow users to toggle the horizontal scroll bar in the
project panel. This was Zed's design before PR #18513, and the default
behavior of VSCode (`workbench.list.horizontalScrolling`).


https://github.com/user-attachments/assets/f633f4e4-a585-4494-8f48-df77c6aca418

## Rationale

Zed's design used to be the same as the default behavior of VSCode.
I.e., no horizontal scrolling, and the view is always snapped to the
left, with long file names clipped of. If you want to see the content
that is out-of-frame, you'll need to drag the handle and expand the
project panel. This could be problematic, especially for large repos
with multiple levels of nested directories, as pointed out by issues
#5550 and #7001.

<img width="1398" height="992" alt="image"
src="https://github.com/user-attachments/assets/d86563f2-0f06-4e9e-818c-155ac45f0f56"
/>\
*VSCode's default setup, for reference.*

Then came PR #18513, which added horizontal scroll and addressed this
pain point, but users didn't have a choice. They're stuck with
horizontal scrolling always turned on. I, for instance, personally
prefer the old, VSCode-default behavior, for most projects I open are
small and don't need horizontal scrolling in the project panel. With
horizontal scrolling always turned on, I find it annoying to have my
project panel view accidentally scrolled to the middle, and I'll have to
grab my mouse and scroll it back. It's also visually redundant.

Thus, why not add an option like VSCode's
`workbench.list.horizontalScrolling` and let users choose? I'd love to
be able to, say, set a per-project override for the projects that need
horizontal scrolling, while having it disabled by default.

## Extra Notes

- I was originally thinking about using `ScrollbarAxes` from
`src/editor_settings.rs` and make the option
`project_panel.scrollbar.axes.horizontal` similar to the global editor
scrollbar settings, but this option is specific to the project panel and
it doesn't quite make sense to allow disabling vertical scrolling on the
project panel, so I added a standalone option for it instead, similar to
VSCode's `workbench.list.horizontalScrolling`.

- I went the conservative route and set horizontal scrolling to enabled
(current behavior) by default. Imo it might make more sense to disable
it by default instead, similar to VSCode, but I'll leave this for the
Zed team to decide.

- I named it `horizontal_scroll` instead of `horizontal_scrolling` to be
consistent with the adjacent setting `sticky_scroll`.

- As for tests, I don't see tests for the scrollbar, so I didn't add
any.

I'd be glad to update the PR if anything is not inline with the
project's requirements or conventions.

---

Release Notes:

- Added `project_panel.scrollbar.horizontal_scroll` setting to allow
toggling horizontal scrolling in the project panel

Signed-off-by: k4yt3x <i@k4yt3x.com>
2026-03-13 15:25:54 +00:00
..
ai docs: Fix YAML syntax error in frontmatter (#51004) 2026-03-08 16:53:46 +00:00
collaboration docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
development docs: Improve feature process (#51425) 2026-03-13 00:36:21 +03:00
extensions docs: Introduce fresh documentation for snippets in extensions (#50874) 2026-03-13 12:38:25 +00:00
languages docs: Clarify that "..." enables all other registered language servers (#51427) 2026-03-13 00:05:27 +00:00
migrate docs: Update VS Code's outdated Copilot instructions to match other editors (#49823) 2026-03-01 10:16:26 +00:00
reference project_panel: Add horizontal scroll setting (#51143) 2026-03-13 15:25:54 +00:00
all-actions.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
appearance.md Add hotkeys and actions for toggle light and dark theme (#49027) 2026-03-12 21:35:42 +02:00
authentication.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
command-palette.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
completions.md Remove Supermaven-related code from Zed (#50537) 2026-03-02 22:18:49 +00:00
configuring-languages.md docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
configuring-zed.md docs: SEO content improvements for AI section (#49128) 2026-02-13 13:05:57 -08:00
debugger.md docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
dev-containers.md docs: Add AI SEO frontmatter (#48559) 2026-02-11 13:10:31 -08:00
development.md Improve documentation for ETW profiling (#50426) 2026-02-28 23:03:49 -05:00
diagnostics.md docs: Add AI SEO frontmatter (#48559) 2026-02-11 13:10:31 -08:00
editing-code.md docs: SEO content improvements for AI section (#49128) 2026-02-13 13:05:57 -08:00
environment.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
extensions.md docs: Introduce fresh documentation for snippets in extensions (#50874) 2026-03-13 12:38:25 +00:00
finding-navigating.md docs: Remove Preview callouts for stable release (#50119) 2026-02-25 14:16:54 -06:00
getting-started.md docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
git.md docs: Update File History menu label from Open to View (#49859) 2026-03-01 10:02:33 +00:00
globs.md docs: Remove Preview callouts for stable release (#50119) 2026-02-25 14:16:54 -06:00
helix.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
icon-themes.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
installation.md docs: Add AI SEO frontmatter (#48559) 2026-02-11 13:10:31 -08:00
key-bindings.md Fix docs validation to detect unknown keys (#49660) 2026-02-19 20:46:21 -05:00
languages.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
linux.md Update linux.md to add Ubuntu community packages (#49654) 2026-02-24 11:08:10 +00:00
macos.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
multibuffers.md docs: Add AI SEO frontmatter (#48559) 2026-02-11 13:10:31 -08:00
outline-panel.md docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
performance.md Change miniprofiler file extension to .miniprof.json (#50429) 2026-03-04 07:18:52 +00:00
quick-start.md docs: Reorganize introduction (#41387) 2025-10-28 17:39:40 -03:00
remote-development.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
repl.md docs: Remove Preview callouts for stable release (#50119) 2026-02-25 14:16:54 -06:00
running-testing.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
semantic-tokens.md extension_host: Allow extensions to define semantic highlighting rules (#49282) 2026-03-02 17:54:53 +01:00
snippets.md docs: Remove outdated reference to simple-completion-language-server (#50732) 2026-03-04 18:45:52 +00:00
SUMMARY.md docs: Introduce fresh documentation for snippets in extensions (#50874) 2026-03-13 12:38:25 +00:00
tab-switcher.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
tasks.md docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
telemetry.md Docs/privacy documentation refresh (#50522) 2026-03-02 11:21:07 -08:00
terminal.md docs: SEO content improvements for AI section (#49128) 2026-02-13 13:05:57 -08:00
themes.md Add hotkeys and actions for toggle light and dark theme (#49027) 2026-03-12 21:35:42 +02:00
toolchains.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
troubleshooting.md docs: Remove Preview callouts for stable release (#50736) 2026-03-04 15:10:13 -05:00
uninstall.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
update.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
vim.md docs: Remove Preview callouts for stable release (#50119) 2026-02-25 14:16:54 -06:00
visual-customization.md settings: Remove unused file_finder.git_status setting (#49889) 2026-02-26 18:53:17 +00:00
windows.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00
worktree-trust.md docs: Apply documentation standards across all docs (#49177) 2026-02-17 20:58:17 -06:00