# settings ui: Create settings key trait \(\#37489\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5f03202b5cda0baff80212af07f80454c8aca1cd

Requested commit: 5f03202b5cda0baff80212af07f80454c8aca1cd

Commit: 5f03202b5cda0baff80212af07f80454c8aca1cd

Tree: 8c060e88200ac067ddcdff64777c5340de24a751

Author: Anthony Eid

Committer: GitHub

## Message

```
settings ui: Create settings key trait (#37489)

This PR separates out the associated constant `KEY` from the `Settings`
trait into a new trait `SettingsKey`. This allows for the key trait to
be derived using attributes to specify the path so that the new
`SettingsUi` derive macro can use the same attributes to determine top
level settings paths thereby removing the need to duplicate the path in
both `Settings::KEY` and `#[settings_ui(path = "...")]`

Co-authored-by: Ben Kunkle <ben@zed.dev>

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
```

## Parents

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

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