# lsp: Add support for linked editing range edits \(HTML tag autorenaming\) \(\#12769\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b6ea393d140b52bab05892cf2718e1aef965bcb1

Requested commit: b6ea393d140b52bab05892cf2718e1aef965bcb1

Commit: b6ea393d140b52bab05892cf2718e1aef965bcb1

Tree: 11acf6cea1777c4e4cbe5cae2bc150f29de1e52f

Author: Piotr Osiewicz

Committer: GitHub

## Message

````
lsp: Add support for linked editing range edits (HTML tag autorenaming) (#12769)

This PR adds support for [linked editing of
ranges](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_linkedEditingRange),
which in short means that editing one part of a file can now change
related parts in that same file. Think of automatically renaming
HTML/TSX closing tags when the opening one is changed.
TODO:
- [x] proto changes
- [x] Allow disabling linked editing ranges on a per language basis.

Fixes #4535 

Release Notes:
- Added support for linked editing ranges LSP request. Editing opening
tags in HTML/TSX files (with vtsls) performs the same edit on the
closing tag as well (and vice versa). It can be turned off on a language-by-language basis with the following setting:
```
  "languages": {
    "HTML": {
      "linked_edits": true
    },
  }
```

---------

Co-authored-by: Bennet <bennet@zed.dev>
````

## Parents

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

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