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

Using inline-symbol on a symbol bound via destructuring fails

maxrothman opened this issue · comments

Describe the bug
Attempting to use the inline-symbol code action/command on a symbol bound via destructuring fails with an error. Given this code, where the cursor position is marked by |:

(let [[x xs] (range 5)]
  (inc x|))
  1. Trigger code actions
  2. Select "Inline symbol"

Expected behavior
The following code is seen in the editor:

(inc (first (range 5))

Actual behavior

  • No changes are made in the editor
  • In the "Clojure Language Client" output panel, I see the following error:
    [Error - 11:54:04 AM] Request workspace/executeCommand failed.
    Message: Internal error
    Code: -32603 
    [object Object]
    
Log - client <-> server
[Trace - 1:12:28 PM] Sending request 'workspace/executeCommand - (17569)'.
Params: {
    "command": "inline-symbol",
    "arguments": [
        "file:///Users/maxrothman/repos/advent-of-code/2023/clj2023/src/clj2023/day19.clj",
        169,
        8
    ]
}

[Trace - 1:12:28 PM] Received response 'workspace/executeCommand - (17569)' in 9ms. Request failed: Internal error (-32603).
Error data: {
"id": 17569,
"method": "workspace/executeCommand"
}

[Error - 1:12:28 PM] Request workspace/executeCommand failed.
Message: Internal error
Code: -32603
[object Object]

User details (please complete the following information):

  • OS: MacOS
  • Editor VSCode (Calva)
  • Version: 2023.12.29-12.09.27