You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to rename an identifier in Haskell code, nothing happens and I get this error instead:
Invalid for language server to send a `defaultBehavior` response to `prepareRename`
Steps to trigger the problem:
Open a Haskell project (haskell-language-server version: 2.9.0.0 (GHC: 9.6.6)).
Make sure HLS is otherwise functioning.
Try to rename an identifier (e.g. a top-level function).
Actual Behavior:
The rename input never appears and I get an error.
Expected Behavior:
I'm allowed to enter the new name as usual.
This could very well be an upstream problem of HLS not correctly implementing the language server protocol. But things were working fine until a few versions ago, so I'm not sure if Zed needs to be that strict about it. haskell/haskell-language-server#3130 might also be related, though this also happens for identifiers in modules with an explicit export list that are not exported.
I agree with you it seems like hls is returning an invalid/unexpected response that we should probably consider being less strict about. Thanks for reporting this!
This is just a LSP spec incompatibility (we don't support defaultBehavior). There was actually a recent fix for Gleam where prepareRename did not work for them either.
Granted, a language server should check with the capabilities we send out to see if they can use DefaultBehaviour in the first place.. so it's also a bug on Haskell Language Server side too :)
Summary
When trying to rename an identifier in Haskell code, nothing happens and I get this error instead:
Steps to trigger the problem:
haskell-language-server version: 2.9.0.0 (GHC: 9.6.6)
).Actual Behavior:
The rename input never appears and I get an error.
Expected Behavior:
I'm allowed to enter the new name as usual.
This could very well be an upstream problem of HLS not correctly implementing the language server protocol. But things were working fine until a few versions ago, so I'm not sure if Zed needs to be that strict about it. haskell/haskell-language-server#3130 might also be related, though this also happens for identifiers in modules with an explicit export list that are not exported.
Zed Version and System Specs
Zed: v0.171.4 (Zed)
OS: Linux Wayland ubuntu 24.04
Memory: 30.8 GiB
Architecture: x86_64
GPU: Intel(R) Arc(tm) Graphics (MTL) || Intel open-source Mesa driver || Mesa 24.0.9-0ubuntu0.3
The text was updated successfully, but these errors were encountered: