# diagnostics: Respect toolbar breadcrumbs setting in diagnostics panel \(\#44974\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/37bd27b2a8b2f26e70c3a279bad1fbb70d0e3f47)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 37bd27b2a8b2f26e70c3a279bad1fbb70d0e3f47

Requested commit: 37bd27b2a8b2f26e70c3a279bad1fbb70d0e3f47

Commit: 37bd27b2a8b2f26e70c3a279bad1fbb70d0e3f47

Tree: 87d851de369bbeef8da61e3cfab354f7acc552c9

Author: lif

Committer: GitHub

## Message

```
diagnostics: Respect toolbar breadcrumbs setting in diagnostics panel (#44974)

## Summary

The diagnostics panel was ignoring the user's `toolbar.breadcrumbs`
setting and always showing breadcrumbs. This makes both
`BufferDiagnosticsEditor` and `ProjectDiagnosticsEditor` check the
`EditorSettings` to determine whether to display breadcrumbs.

## Changes

- `buffer_diagnostics.rs`: Updated `breadcrumb_location` to check
`EditorSettings::get_global(cx).toolbar.breadcrumbs`
- `diagnostics.rs`: Updated `breadcrumb_location` to check
`EditorSettings::get_global(cx).toolbar.breadcrumbs`

This follows the same pattern used by the regular `Editor` in
`items.rs`.

## Test plan

1. Set `toolbar.breadcrumbs` to `false` in settings.json
2. Open a file with diagnostics
3. Run `diagnostics: deploy current file`
4. Verify that breadcrumbs are hidden in the diagnostics panel

Fixes #43020
```

## Parents

- [775548e93c2fe1f56351acc92ae95b379b5cc4d6](https://git.cafe/gitcafe/zed/commit/775548e93c2fe1f56351acc92ae95b379b5cc4d6?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/37bd27b2a8b2f26e70c3a279bad1fbb70d0e3f47?format=markdown)
