zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.16k stars 2.97k forks source link

Problems with linked editing ranges through Clojure LSP #20002

Open edahlseng opened 22 hours ago

edahlseng commented 22 hours ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I'm running into a couple of issues with the linked editing ranges feature through the Clojure LSP:

  1. Linked editing ranges are being triggered when adding/changing a symbol separate by a space from another symbol
  2. Linked editing ranges are editing symbols when I wouldn't expect them to

Problem 1 above appears to be a bug; I don't know if problem 2 is a bug or an unfortunate side-effect of the linked editing ranges feature. I've attached a screenshot exhibiting the issues below.

I do not know if these issues are with Zed, with Zed's Clojure extension, or the Clojure LSP. Is there a way to turn off a specific LSP feature? If so, I could at least turn off the linked editing ranges feature as a workaround.

https://github.com/user-attachments/assets/10d07b08-e250-4558-8813-8d6be8267d65

(carrots are a fruit, right?! 😄 )

Environment

Zed: v0.158.2 (Zed) OS: macOS 14.6.1 Memory: 16 GiB Architecture: x86_64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log


osiewicz commented 16 hours ago

I do not know if these issues are with Zed, with Zed's Clojure extension, or the Clojure LSP. Is there a way to turn off a specific LSP feature? If so, I could at least turn off the linked editing ranges feature as a workaround.

Yes, there's a linked_edits property on a language that you can set to true or false:

"languages": {
  "Clojure": {
    "linked_edits": false
  }
}

I'll take a look at your repro in a bit. Thanks for making it so concise.