We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Given this code:
foo(A) -> A. -spec bar(A :: integer()) -> integer(). bar(A) -> A.
Using the "Rename" command with text "B" on either of the A variables in foo produces:
A
foo
foo(B) -> B. -spec bar(B :: integer()) -> integer(). bar(A) -> A.
Expected behavior
It should not touch the spec and produce:
foo(B) -> B. -spec bar(A :: integer()) -> integer(). bar(A) -> A.
Context
erlang_ls
The text was updated successfully, but these errors were encountered:
thanks Michal for the report. Indeed the heuristic to find the scope of the variable needs to be improved. (Currently it assumes the scope is a function clause and to find the end it takes the next function clause after the variable https://github.com/erlang-ls/erlang_ls/blob/main/apps/els_lsp/src/els_rename_provider.erl#L231)
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Describe the bug
Given this code:
Using the "Rename" command with text "B" on either of the
A
variables infoo
produces:Expected behavior
It should not touch the spec and produce:
Context
erlang_ls
version (tag/sha): Last release (Erlang LS (in erlang_ls), version: 0.21.2, OTP version: 24)The text was updated successfully, but these errors were encountered: