Disclaimer, I am very new to Fortran and computation in general. I am attempting to incorporate Fortls into Modern Fortran in VS Code. I am running a remote session of Windows Subsystems for Linux with Ubuntu and have downloaded Fortls via pip on WSL. I have directed VS Code to Fortls via the path in my WSL library, as recommended by user gnikit in the thread titled “Fortls installation & Autocomplete Suggestions” here, as shown below:
However, I still receive the usual message recommending that I install Fortls. Additionally, my Modern Fortran output does not list Fortls as being initialized.
I have also installed Fortls via pip on my Windows library and attempted to direct VS Code via that path instead and I am met with the same issues.
If anyone has an idea as to what is going wrong or ways to troubleshoot this, that would be very appreciated!
Thank you for the reply. I have updated the path to include the binary name, now “\wsl.localhost\Ubuntu\usr\local\bin\fortls”; however, I am met with the same issue. I’ve included the Modern Fortran output below in case that may be helpful:
I think the path separators should be / not .
The second warning is from vscode not the modern Fortran extension, using that recommendation is up to you. Usually the Microsoft team is right about their recommendations.
I attempted to specify the path as these variations: //wsl.localhost/Ubuntu/usr/local/bin
and unfortunately meet the same result. The only path that is able to reach fortls in Ubuntu in the file explorer is “\wsl.localhost\Ubuntu\usr\local\bin”.
In the output of Modern Fortran, it specifies gfortran as being located in “/usr/bin/gfortran”, but my computer when I copy the path shows “\wsl.localhost\Ubuntu\usr\bin\gfortran”. I am not sure why the distinction is made in the Modern Fortran output, but the path to gfortran is not specified in VS Code and is instead accessed via the remote WSL session. This is the only difference I can see between VS Code incorporating gfortran versus fortls.
Any advice is much appreciated! I may attempt to move my entire work environment to the Linux file system to see if that helps.
Apologies for my lack of knowledge! The path “/usr/local/bin/fortls” works, so I needed to omit the “wsl.local host/Ubuntu/” part and format in the Linux path convention of “/”. Thank you for your help!