clojure-lsp / clojure-lsp

Clojure & ClojureScript Language Server (LSP) implementation

Home Page:https://clojure-lsp.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Renaming of function, when done twice, loses track of change

Kaspazza opened this issue · comments

Describe the bug
The problem is that when renaming the same function twice, lsp loses track of its length, making the second rename not applied or applied incorrectly (e.g. mixing name with it's parameters, renaming previous name)

To Reproduce
Steps to reproduce the behavior:

  1. Go to function-name that is used in other namespaces
  2. Execute lsp-rename and change name to a longer or shorter
  3. Save the change - everything looks good but highlighting is lost
  4. Rename the same function again, to an even shorter (or longer name)
  5. The name is messed up or the rename was not showing the proper name

Expected behavior
When I rename a function I want the name to be refreshed in all its references.
So if I rename it to a longer name, I want it in another namespace where it's referenced to be able to rename it from there again.
If I rename a function from the definition point, I want to be able to do it twice there.

Screenshots
Video recording of the issue

User details (please complete the following information):

  • OS: MacOS aarch binary
  • Editor: doom emacs
  • Version: 2024.03.17-17.22.15-nightly

Additional context
workspace-restart between renames fixes it