Skip to content
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

Function symbol rename does not rename the variable name inside the function #322

Open
aerosayan opened this issue Sep 8, 2023 · 1 comment
Labels
bug Something isn't working lsp/rename Issues related with renaming objects

Comments

@aerosayan
Copy link

I'm using neovim, and installed fortls using Mason.

In this code ...

    real pure function sind(x)

        real, intent(in), value :: x

        sind = sin(x*((4.0*atan(1.0))/180.0))

    end function

Going to the function name sind in the line real pure function sind(x) and renaming it using the symbol rename method in neovim( with fortls LSP) only changes the function name, and everywhere it's used, which is good, but does not change the internal variable name sind in the line sind = sin(x*((4.0*atan(1.0))/180.0))

I had to manually rename it.

It would be nice if the variable name sind was also renamed automatically.

I'm not sure if this was intended, or if it is a bug, but if it would be easy to support this feature, then I humbly request this to be supported.

Thanks.

@aerosayan aerosayan added the bug Something isn't working label Sep 8, 2023
@gnikit gnikit added the lsp/rename Issues related with renaming objects label Oct 15, 2023
@gnikit
Copy link
Member

gnikit commented Oct 15, 2023

This is not intended. I can't tell for sure without looking into this, but there will be complications with the intrinsic function sind. The bug probably is related to other bugs that are open here with user functions overwriting intrinsic functions. Fixing this category of issues is not a high priority right now, but I am more than happy to review a pull request about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lsp/rename Issues related with renaming objects
Projects
None yet
Development

No branches or pull requests

2 participants