-
-
Notifications
You must be signed in to change notification settings - Fork 39
v3.0.0
🎉 We have migrated to The Fortran Programming Language Organization 🎉!
The linting diagnostics have been improved, with supported being added for the Intel's compilers, allowing custom compiler root paths and additional diagnostic messages such as preprocessor warnings.
Intel compilers are now supported set the following options in settings.json:
{
"fortran.linter.compiler": "ifort",
"fortran.linter.compilerPath": "/path/to/intel/compilers/bin/ifort" // or ifx
}
Preprocessor warnings and errors are now properly supported during linting

A lot of the higher level features like Hover, Go-To, Peeking definitions and
finding References are provided by Language Servers. Modern Fortran now natively
supports the fortls Language Server.
Modern Fortran will prompt you to install fortls with pip upon initialization if
not detected in your system.
You can select a custom path to a fortls installation by setting the setting
{
"fortran.fortls.path": "/path/to/fortls"
}Some options for fortls have explicit settings through Modern Fortran settings,
like fortran.fortls.notifyInit and fortran.fortls.incrementalSync. You can
find a complete list of the explicit options in the Feature Contributions tab
of the Modern Fortran extension.
In case there is no explicit setting for a fortls option, you can pass the
option to fortls through
{
"fortran.fortls.extraArgs": ["--nthreads=8", "--autocomplete_name_only"]
}For more information about fortls configuration options see the
fortls Documentation
It is now possible to have Language Server support with fortls for multiple
workspaces and single files. Simply open a standalone Fortran file and fortls or add a
folder to the workspace.
There are 2 ways of passing options to fortls either through the VS Code
settings.json or through the fortls configuration file.
fortls is listening for changes on both types of files and will pass them to the server
without having to restart.
Warning: This feature is experimental if changes do not take effect you can always restart
fortlsthrough the Command Palette.
Two convenience commands have been added, accessible from the Command Palette with
the prefix Fortran:
- Fortran: Restart the Fortran Language Server
- Fortran: Rescan Linter paths
Debugging functionality was previously limited when it came to nested user-defined types and hovering. This issue has been resolved and full information about an object can be shown in the hover messages while debugging.

Due to the plethora of changes to the Modern Fortran extension the following VS Code extensions are redundant and no longer compatible with Modern Fortran:
-
FORTRAN IntelliSense: provided an interface for a now deprecated Language Server. It has been superseeded by
fortlsnad its native integration with Modern Fortran. - Fortran Breakpoint Support: is redundant and deprecated, Modern Fortran has native breaking point support.
- fortran: is redundant and deprecated, Modern Fortran has native support for Syntax Highlighting.
- External Formatters like vscode-modern-fortran-formatter are redundant and deprecated, Modern Fortran has native formatter support for
fprettifyandfindent.
The following settings have been deprecated are replaced by the following:
-
includePathsin favour oflinter.includePaths -
gfortranExecutablein favour oflinter.compilerPath -
linterEnabledin favour oflinter.compiler == Disabled -
linterExtraArgsin favour oflinter.extraArgs -
linterModOutputin favour oflinter.modOutput -
ProvideSymbolsin favour ofprovide.symbols symbols-
provideHoverin favour ofprovide.hover -
provideCompletionin favour ofprovide.autocomplete
There are a number of other bug fixes, feature enhancements and minor improvements that have taken place in both the extension and the syntax highlighting. A brief list is shown below:
- Changed need for matching begin-end scope names, in the following constructs: Functions, Modules, Programs, Module Procedures, Subroutines, Submodules. For a more detailed explanation as to why see the issue (#278)
- Changed
linter.compilerPathto use the full path to the compiler instead of the root (#500) - Merged Language Server's log channel to Modern Fortran's log channel
- Fixed
error stop variablesyntax highlighting (#486) - Fixed issue with linter cache containing outdated folders (#464)
- Fixed slow performance of very long lines by using a different solution for (#207) (#309)
- Fixes linter activation from
Disabledto some compilerXwithout having to restart the extension (#296) - Fixes nopass pointer erroneous syntax highlighting (#318)
- Fixes
%accessor highlighting for type-bound subroutines (#325) - Fixes
fortlsnot spawning whenignoreWarningwas set to true (#365) - Fixes formatting on Windows (needed .exe extension) (#354)
- Fixes
onSaveformatting errors (#364)