-
-
Notifications
You must be signed in to change notification settings - Fork 390
Symbol renaming work in simple modules without any exports does not work #3571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks for your report! It's a known limitation for hls-rename-plugin, see #3130 for details. |
Rename only work for local symbols, without the explicit export list, hls with consider all function as exported symbols, that doesn't work. So you have two choices:
|
Ah, makes sense: The initial error means I can normally rename local symbols only with export list, but with the crossModule setting I can rename local symbols even without export list, right? Then excuse my newbie question, but in which file do I need to set this HLS setting |
Thank you, @July541! This works brilliantly! PS: Not sure whether I should close this issue... |
Hello, and thank you for creating HLS! I'm on Windows in VSCode, and I just ran into the "Explicit export list required for renaming." Luckily, setting |
Your environment
Using VS Code as LSP client with Haskell 9.2.5 via ghcup on macOS. HLS is on 1.9.1
Steps to reproduce
Write a simple module
Cnt.hs
:No exports needed. (I will load the file into ghci to play with it.)
Then try to rename
mostFrequentChar'
tomostFrequentChar
.Expected behaviour
I expected that
mostFrequentChar'
is changed tomostFrequentChar
.Actual behaviour
No renaming is performed, but you get (in VS Code):
See also
I discussed this problem first on the Haskell discourse.
The text was updated successfully, but these errors were encountered: