# Handle itemDefaults in CompletionList according to spec \(\#41187\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8e09256c8ccf522aa4107cf9f0ec48fb4f75a8e8

Requested commit: 8e09256c8ccf522aa4107cf9f0ec48fb4f75a8e8

Commit: 8e09256c8ccf522aa4107cf9f0ec48fb4f75a8e8

Tree: a3c9be5eb436304533a989c10b3dc4fed954cf9b

Author: Karl-Erik Enkelmann

Committer: GitHub

## Message

```
Handle itemDefaults in CompletionList according to spec (#41187)

Closes https://github.com/zed-extensions/java/issues/101

Previously Zed did not handle resolving CompletionList with itemDefaults
correctly according to the
[LSP-Spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#:~:text=/**%0A%09%20*%20The%20edit%20text,%3F%3A%20string%3B).
When a `CompletionList` is provided by the server, that includes ranges
as `itemDefaults`, the field to use for the snippet to insert as
`newText` is in the `textEditText` field, with a fallback to `label` if
that does not exist (`insertText` is ignored).

Release Notes:

- Fixed Java language severs' completion defaults handling on Zed's side
```

## Parents

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

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