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

Functions returning arrays hover handling #50

Closed
gnikit opened this issue Feb 21, 2022 · 1 comment
Closed

Functions returning arrays hover handling #50

gnikit opened this issue Feb 21, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gnikit
Copy link
Member

gnikit commented Feb 21, 2022

Currently hovering on a function that returns an array will either produce the variable signature (which is incorrect and has now been fixed in PR #49 ) or it will display the function signature with the array dimensions in the function definition.

Although that is convenient, the hover request displays invalid FORTRAN syntax which in turn causes syntax highlighting in VSCode to break. IMO all parts of the server, except snippets which contain placeholders, should be producing valid FORTRAN syntax.

I propose the following hover message

real function foo(arg) result(val)
  real, intent(in) :: arg
  real, dimension(10,10) :: val

instead of

real dimension(10,10) function foo(arg) result(val)
  real, intent(in) :: arg

This would also mean that #47 would now have to include an additional line with the result variable at all times

@gnikit gnikit self-assigned this Feb 21, 2022
@gnikit gnikit added the bug Something isn't working label Feb 21, 2022
@gnikit
Copy link
Member Author

gnikit commented Feb 22, 2022

Closed via #49

@gnikit gnikit closed this as completed Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant