hansec / fortran-language-server

Fortran Language Server for the Language Server Protocol
MIT License
295 stars 57 forks source link

suggest parameter names #133

Open michaelkonecny opened 5 years ago

michaelkonecny commented 5 years ago

Fortran supports passing arguments via their names. For example, this function:

subroutine mysubroutine(arg1, arg2)
   integer, intent(in) :: arg1
   integer, intent(in) :: arg2
   !...
end subroutine mysubroutine

can be called like this: call mysubroutine(1, 2) but also like this: call mysubroutine(arg1=1, arg2=2) where the order is not relevant: call mysubroutine(arg2=2, arg1=1)

Using the argument names can sometimes really improve code readability.

It would be nice, when one's cursor is inside the function call brackets, to get autocomplete suggestions for the argument names (arg1, arg2).