Fortran and VSC

I am experimenting with Fortran in Visual Studio Code (VSC) after a long time using Geany.

When I go to outline, VSC only lists the functions, none of the subroutines.

Anyone have experience of this IDE and know if this is resolvable?

Hi @garynewport, I think I can help. Fortran-lang currently has extension (Modern Fortran - Visual Studio Marketplace) for vscode which provides the bulk of the functionality along with the fortls language server (GitHub - fortran-lang/fortls: fortls - Fortran Language Server).

Out of the gate the settings of both should be pretty sensible. Nonetheless, different projects call for different configurations so the Modern Fortran vscode extension offers a wide range of customisation. The language server, fortls, has a dedicated documentation webpage (in contrast to the single page documentation offered by Modern Fortran). You can check out fortls’ documentation at https://fortls.fortran-lang.org/

Let us know how you get on and if you are having any issues.

2 Likes

I actually already had this installed but I am still only seeing the functions, not the procedures/subroutines within the Fortran code?

Can you post a minimal sample code and screenshots of the Symbols pane?