Modern Fortran: No Go to Definitions, Go to Implementations popup

Hey,

I installed:
VsCode
C/C++ IntelliSense
Modern Fortran
fortls

exported fortls path in .profile

if I enter fortls in terminal it does work

Nevertheless, if I edit a *.f90 file in VsCode with Modern Fortran and right click, there is no option to go to definitions etc…
The syntax is highlighted correctly and if I for example enter
sub ->tab
it will automatically generate a blank subroutine.
So something is working, but not the go to definition part.
And I can not ctrl+left click on a variable to jump to it’s definition etc.

Do you know why this is not working?
Thanks

Welcome to the forum! As I am not a VS Code user nor developer of the Fortran component therein, I cannot help you, but there are people here that are quite knowledgeable about it.

1 Like

Check the path to the fortls in the VS Code settings:

Hey,

thanks for the reply.
I already tried with fortls or the path to the binary file.

Hi @mdeberts welcome to the Discourse! You might want to have a look at some of the other posts here under the Visual Studio Code tag for answers to similar problems. For example see

From what you’re describing it sounds like fortls is not being activated. Try setting the output level to Debug and posting your log output along with your settings.json.

Hey,

thanks for your help.
The problem was as simple as an outdated VsCode Version.
I updated from 1.70 to 1.72 and now it is working.