fortran-language-server
fortran-language-server copied to clipboard
not jumping to module procedures defined in submodule
When using submodules, you define the interface in the module block and can put module procedures in other files. When I want to jump to the definition of a module procedure call, it jumps to the interface definition, though I'd prefer to jump to the actual definition. Nonetheless, the interface doesn't jump to the module procedure definition either, and in fact the definition doesn't show up as a reference.
Something like this reproduces my problem.
module test_module
implicit none
interface
module subroutine test_subroutine()
end subroutine
end interface
end module test_module
submodule(test_module) test_submodule
contains
module subroutine test_subroutine()
end subroutine
end
I am using VSCode FORTRAN Intellisense, so could the problem be there? It seems like this capability was supposed to be added in #15
Thanks for the report and sorry for the delay. I think there are actually two things going on here.
The first issue with jumping to the "definition" of the subroutine as opposed to the interface should really covered by the Go To Implementation command. Although, at the moment this is not supported by fortls
for sub-modules so I will work on adding that.
As for the second issue, I think I agree that most people would expect this type body definition to show up in the list of references. I will work on correcting that bug.