Fortran development in Visual Studio Code
Visual Studio Code is a free open source code editor with numerous extensions supporting most code languages, including for proprietary languages like Matlab. Fortran is well-supported by Visual Studio Code using the Modern Fortran extension, which supports linting, formatting integration, symbol navigation, and works well with fortls.
Typical setup:
- Install a Fortran compiler such as GFortran.
- Install the Modern Fortran extension.
- Install
fortlsfor improved language-server features:
python -m pip install fortlsIf GFortran is on PATH, Modern Fortran can use it for linting automatically.