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 function loses references and requires lsp-restart-workspace

Kaspazza opened this issue · comments

Describe the bug
When lsp-rename on function is run, it's changing all references where fn is used, but it seems like the lsp state is not changed and it has state as it was before, also "lsp" now don't refresh it, only lsp-restart-workspace.

To Reproduce
Steps to reproduce the behavior:

  1. Go to slurp-bb fn
  2. Run lsp it should show "1 references"
  3. Run lsp-rename to e.g. slurp-bb-edn
  4. Run ctrl-x + s to save all buffers
  5. Right now you should see that lsp is highlighting the function name to the length of old name (highlighting up to slurp-bb instead of slurp-bb-edn)
  6. Run "lsp"
  7. References are 0
  8. Run lsp-restart-workspace
  9. References are correct (1 and highlighting full name)

Expected behavior
The best option: I run lsp-rename and it updates already.
How it was previously: I run lsp-rename -> references change to 0 -> I run "lsp" -> it is correct now

Screenshots
If applicable, add screenshots to help explain your problem.

User details (please complete the following information):

  • OS: Mac os - aarch build
  • Editor doom emacs (newest version)
  • I'm using lsp night build 2024.01.15-12.02.49-nightly aarch