# language: Autoclose nested brackets in plain text \(\#60841\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 869d6eae2277be4a8047437cae6d7b336bb4801c

Requested commit: 869d6eae2277be4a8047437cae6d7b336bb4801c

Commit: 869d6eae2277be4a8047437cae6d7b336bb4801c

Tree: 8b4c002c9eff29e6abebc6da99e96e92deb3c50c

Author: Apoorva Verma

Committer: GitHub

## Message

```
language: Autoclose nested brackets in plain text (#60841)

in a plain text file, cursor before a closing bracket, type an opening
one and nothing autocloses. `anything|)` + `[` gives `anything[|)` not
`anything[]|)`. fine in js/css/py.

autoclose checks the language's `autoclose_before` set. every language
sets one, plain text didn't, so a closing bracket ahead of the cursor
killed it. gave it `)]}`.

went `)]}` not the usual `;:.,=}])>` since plain text only has brackets.
`.typ` (Typst) is a separate extension, needs the same fix there.

Fixes #60560.

Release Notes:

- Fixed nested brackets not auto-closing in plain text files
```

## Parents

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

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