# Consider the colon to be a word character when inside a string in JSON \(\#26574\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6bdd2cf7db5d7ba1ee13cbb5e6ae0145efd53e45

Requested commit: 6bdd2cf7db5d7ba1ee13cbb5e6ae0145efd53e45

Commit: 6bdd2cf7db5d7ba1ee13cbb5e6ae0145efd53e45

Tree: 673f82496afd84a672119cf20dbe831b0087987a

Author: KyleBarton

Committer: GitHub

## Message

```
Consider the colon to be a word character when inside a string in JSON (#26574)

Partially addresses #25698

Part of why autocomplete suggestions for `keymap.json` aren't great is
because `:` is (correctly) considered a punctuation character, rather
than a word character, in JSON. But since `::` is part of the name of
zed commands, it means that the autocomplete context window loses
context after the user types colon:

Suggestion here is to use overrides for JSON and JSONC such that colon
is considered a word character when it's inside a string. This improves
the experience:

I believe this is more broadly correct anyway, since `:` loses it's
punctuation meaning when inside a string.

Hope this is helpful!

Release Notes:

- Improved autocomplete for keymap.json by treating `::` like word characters when inside a string.
```

## Parents

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

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