GoTo/Peek features not working for modules inside a subfolder

So, my project directory is like this

    |- files
    |- include
    |   |- modules.f90
    |   |- modules.mod

I can compile and link my code using the following terminal command.

gfortran ./include/modules.f90 -I./include/ main.f90 -J./include/ -o main

However, the goto definition feature is not working as can be seen in this picture. Anyone can help me? Thanks

1 Like

Welcome to the forum!

The info you gave is somewhat limited but to start, the message you are getting is quite clear. You do not have json_module.mod file in your project tree. If you do have it elsewhere (from another project), you should add the directore it resides in, using -Idir option

1 Like

Thank you for the fast response.

Sorry if the question is unclear. The directory tree I wrote is just an analog to the actual directories. So, modules.f90 is actually a bunch of modules, and one of them is json_module.

Nevertheless, I think I need to tell fortls where to look for the modules so that it can find the definition. But, I don’t know how to do this.