# gleam: Strip newlines in completion details returned from language server \(\#10304\) · gitcafe/zed

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

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

Visibility: public

Requested revision: a4566c36a3b9c04801d8654c8386084ceae6645b

Requested commit: a4566c36a3b9c04801d8654c8386084ceae6645b

Commit: a4566c36a3b9c04801d8654c8386084ceae6645b

Tree: c29286bed3014366353fc468c7498ddbb953f014

Author: Marshall Bowers

Committer: GitHub

## Message

```
gleam: Strip newlines in completion details returned from language server (#10304)

This PR updates the Gleam extension to strip out newlines in the
completion details returned from the language server.

These newlines were causing the completion menu to compute a large
height for each item, resulting in lots of empty space in the completion
menu:

<img width="878" alt="Screenshot 2024-04-08 at 8 53 29 PM"
src="https://github.com/zed-industries/zed/assets/1486634/383c52ec-e5cb-4496-ae4c-28744b4ecaf5">

The approach to stripping newlines allocates a bit more than I would
like.

It would be good to see if it is possible for the Gleam language server
to not send us these newlines in the first place.

Release Notes:

- N/A
```

## Parents

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

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