# project: Fix \`SymbolKind\` serialization over RPC \(\#62458\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c83adb3dbfdf76acee2b44f9b5ea15452ddb5d9d

Requested commit: c83adb3dbfdf76acee2b44f9b5ea15452ddb5d9d

Commit: c83adb3dbfdf76acee2b44f9b5ea15452ddb5d9d

Tree: 6f654e057e63f968728a33b7145e019baf9e897a

Author: 狐狸

Committer: GitHub

## Message

```
project: Fix `SymbolKind` serialization over RPC (#62458)

# Objective

I noticed that in workspace symbol search, the function's symbol kind
has become `Trait`.


## Solution

Add `to_proto` and a macro to define the mapping instead of `as i32`.

## Testing

Updated the test.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] 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

---

Release Notes:

- Fixed `SymbolKind` mapping to LSP protocol values
```

## Parents

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

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