# Modern Fortran for VS Code v4.0.0 Release

**URL:** <https://fortran-lang.discourse.group/t/modern-fortran-for-vs-code-v4-0-0-release/10609>\
**Category:** Announcements\
**Created:** [January 9, 2026, 8:07pm UTC](https://fortran-lang.discourse.group/t/modern-fortran-for-vs-code-v4-0-0-release/10609 "2026-01-09T20:07:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gnikit](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/gnikit/32/1213_2.png) [@gnikit](https://fortran-lang.discourse.group/u/gnikit)\
**Post date:** [January 9, 2026, 8:07pm UTC](https://fortran-lang.discourse.group/t/modern-fortran-for-vs-code-v4-0-0-release/10609/1 "2026-01-09T20:07:08Z")

</div>

Hi all, it’s been a while!

Modern Fortran Release v4.0.0 is finally out! 🎉

This effort has been a few years of work and took a lot longer to release than expected.  
I have written a top-level summary of most new features, but the changes are [numerous](https://github.com/fortran-lang/vscode-fortran-support/compare/v3.1.0...v4.0.0). Below are some comments I would like to point out in addition to the [What’s New section](#whats-new-v400) below.

- Users will be pleased to know that the extension is available in both [VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran) and [Open VSX Marketplace](https://open-vsx.org/extension/fortran-lang/linter-gfortran). For Open VSX users the bullet points in this [section](https://github.com/fortran-lang/vscode-fortran-support?tab=readme-ov-file#debugging) are of particular relevance. Nightly pre-releases will be available to both chanels.

- Windows users should finally have a slightly better experience with python installing packages and a [full rework](https://github.com/fortran-lang/vscode-fortran-support/pull/1290) is in progress (albeit slowly).

- Issues with extension signing and publisher verification have been fully resolved.

- Features like the `Linter Initialisation` I would classify as experimental, and stay away from unless your project is very simple. Probably this feature will be reworked with `fpm/cmake` in mind.

If you like the extension consider leaving a [VS Marketplace review](https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran&ssr=false#review-details) or a [Open VSX Marketplace review](https://open-vsx.org/extension/fortran-lang/linter-gfortran/reviews).

The roadmap for the next major features to Modern Fortran is far from being complete and I would love to hear your ideas. Currently I am thinking:

- linting for nvidia compilers
- Better python support
- integration with fpm/cmake/makefiles
- some major refactorings in the codebase

On a personal note, I will be off for a few months, but when I am back I am excited to start working on `fortls`, `Modern Fortran` and our many other Fortran-lang projects.

Thanks for your time and chat soon,  
Giannis

* * *

# What’s New (v4.0.0)

## 🎉 Modern Fortran Release v4.0.0 🎉!

- [Linter](#linter)
  - [`fypp` support](#fypp-support)
  - [Improved diagnostics for GNU Fortran](#improved-diagnostics-for-gnu-fortran)
  - [LFortran Linter support](#lfortran-linter-support)
  - [Persistent Cache](#persistent-cache)
  - [Dynamic Linter Options](#dynamic-linter-options)
  - [Reduced Linter Noise](#reduced-linter-noise)
  - [Commands](#commands)

- [User Interface (UI)](#user-interface-ui)
  - [Run and Debug individual files](#run-and-debug-individual-files)
  - [Log Channel improvements](#log-channel-improvements)
  - [Setting verbosity level](#setting-verbosity-level)
  - [Added Fortran Logo icon](#added-fortran-logo-icon)
  - [Added relative path resolution for `fortls` and formatters](#added-relative-path-resolution-for-fortls-and-formatters)
  - [Added variable resolution support for `fortls`](#added-variable-resolution-support-for-fortls)
  - [Added `fpm.toml` schema validation](#added-fpmtoml-schema-validation)
  - [Added `fortls` configuration schema validation](#added-fortls-configuration-schema-validation)
  - [Syntax Highlighting improvements](#syntax-highlighting-improvements)
  - [Improved Installation of dependencies using VS Code Tasks](#improved-installation-of-dependencies-using-vs-code-tasks)
  - [New Commands](#new-commands)
    - [`Fortran: Initialize Fortran Linter`](#fortran-initialize-fortran-linter)
    - [`Fortran: Clean Linter generated files`](#fortran-clean-linter-generated-files)
    - [`Fortran: Clean All Linter Diagnostics`](#fortran-clean-all-linter-diagnostics)

  - [New Settings](#new-settings)
    - [Hide Release Notes `fortran.notifications.releaseNotes`](#hide-release-notes-fortrannotificationsreleasenotes)
    - [Linter Initialization `fortran.linter.initialize` (Experimental)](#linter-initialization-fortranlinterinitialize-experimental)
    - [Cleaning Diagnostics `fortran.experimental.keepInitDiagnostics`](#cleaning-diagnostics-fortranexperimentalkeepinitdiagnostics)
    - [Log Channel Verbosity `fortran.logging.level`](#log-channel-verbosity-fortranlogginglevel)

- [Other Changes](#other-changes)
  - [Improved performance of the linter](#improved-performance-of-the-linter)
  - [Update native symbol provider](#update-native-symbol-provider)
  - [Changed Linter glob resolution module to `glob` from `fast-glob`](#changed-linter-glob-resolution-module-to-glob-from-fast-glob)
  - [Nightly Build Release Channel](#nightly-build-release-channel)

- [🐛 Bug Fixes 🐛](#-bug-fixes-)

## Linter

### `fypp` support

Adds some initial support for `fypp` when using `gfortran`. More compilers will follow soon!

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/c/ca0164df17143c0c48a34794fc35f322922220e0.png)

### Improved diagnostics for GNU Fortran

Added support for parsing plain text diagnostics from `gfortran` v11+  
thus allowing the display of multiline diagnostics

```fortran
module err_mod
    private
    implicit none ! <- Error here previously not shown
    contains
        subroutine foo(arg1, arg2)
            integer, intent(in) :: arg1, arg2
            print*, 'arg1:', arg1, 'arg2:', arg2
        end subroutine foo
        subroutine proc_with_err()
            call foo()
        end subroutine proc_with_err
end module err_mod

```

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/8/8656b422909563cad023da028a98e75ae2186210.png)

### LFortran Linter support

The LFortran linter is now available in the extension. It can be enabled by setting the `fortran.linter.compiler` setting to `lfortran`.

### Persistent Cache

By default, now the linter uses a unique VS Code, workspace specific persistent cache directory to store all output files generated by the linter. This should prevent  
any unexpected behaviour where the linter produces unwanted `.mod` files that  
are then picked up by the build system.

You can clean the cache by running the `Fortran: Clean Linter generated files` command, see [Commands](#commands) for more details.

### Dynamic Linter Options

Linter options now update automatically when settings change, so you don’t need to restart the extension or reload the window for changes to take effect.

### Reduced Linter Noise

Duplicate diagnostic messages from the linter have been removed, resulting in a cleaner problems panel.

### Commands

A series of new commands have been added, see **[New Commands](#new-commands)** section for more details.

- `Fortran: Initialize Fortran Linter`
- `Fortran: Clean Linter generated files`
- `Fortran: Clean All Linter Diagnostics`

## User Interface (UI)

### Run and Debug individual files

You can now run and debug individual files. This is useful for debugging small snippets of code. To do this, right-click on the file and select `Run File` or `Debug File` from the context menu.

### Log Channel improvements

The `Modern Fortran` log channel has had a small revamp.  
Logs are now colourized to make reading them easier

 ![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/e/e466e85b819175bbe47a592e66dd22db1ba6d2a4.png)

### Setting verbosity level

You can now choose the verbosity level of the extension by setting the following option in the settings

```json
{
  "fortran.logging.level": "Error"
}

```

### Added Fortran Logo icon

Added a new icon for the Fortran Language files

![image](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/0/05a0d2bcad0305c11882f175e191289b68a3b9d7.png)

### Added relative path resolution for `fortls` and formatters

It is now possible to define the path to `fortls` or the formatters using relative  
paths to the top-most workspace folder.

```json
"fortran.fortls.path": "./venv/bin/fortls"

```

### Added variable resolution support for `fortls`

Previously, internal VS Code variables like `${workspaceFolder}` were not resolved  
when defining the path to `fortls`. This has now been fixed.

```json
"fortran.fortls.path": "${workspaceFolder}/venv/bin/fortls"

```

### Added `fpm.toml` schema validation

Leveraging the support for schemas from the Even Better TOML extension,  
Modern Fortran now provides a schema for `fpm.toml` file validation and autocompletion.

![fpm-toml-validation](https://global.discourse-cdn.com/free1/uploads/fortran_lang/original/2X/8/88720caac11489a97c770cdaf9be341ee778d71d.gif)

### Added `fortls` configuration schema validation

We have also added schema support for `fortls` configuration files, providing validation and autocompletion. Currently this is manually updated, in the future we will automate and improve the integration between the two.

### Syntax Highlighting improvements

- Added highlighting for `sync` and `event` image control statements.
- Fixed various highlighting issues for `FORMAT` statements, Fixed Form comments, and labelled `if`/`where` constructs.
- Fixed nested type bound procedure highlighting e.g. `call a%b%c%foo()` `a`, `b` and `c` are correctly highlighted now.
- And many other changes that are too long to list.

### Improved Installation of dependencies using VS Code Tasks

The extension dependencies are now installed using Visual Studio Code’s Tasks. That means that the commands are run from within the VS Code terminal, inheriting any environment variables already present. Particularly useful when using Python virtual environments.

### New Commands

A series of new commands have been added for the linter

#### `Fortran: Initialize Fortran Linter` (Experimental)

Runs a naive mock compilation of all the Fortran source files found in the project  
in order to generate the `.mod` and `.smod` files necessary for the linter. This  
also generates all the Diagnostics for the project.

#### `Fortran: Clean Linter generated files`

Cleans all the `.mod` and `.smod` files generated by the linter that are placed  
in the persistent cache storage of VS Code for this workspace.

#### `Fortran: Clean All Linter Diagnostics`

Cleans all the diagnostics generated by the linter.

### New Settings

#### Hide Release Notes `fortran.notifications.releaseNotes`

Hide release notes when the extension in being installed or updated.

```json
"fortran.notifications.releaseNotes": true

```

#### Linter Initialization `fortran.linter.initialize` (Experimental)

An option, by default `false`, that will attempt to initialize the linter with  
all the Fortran source files found in the workspace upon the extension activation.

Performs the same task as the `Fortran: Initialize Fortran Linter` command.

#### Cleaning Diagnostics `fortran.experimental.keepInitDiagnostics` (Experimental)

An option to keep or discard all the diagnostics generated by running the  
initialization process of the linter.

#### Log Channel Verbosity `fortran.logging.level`

An option to set the verbosity level of the extension log channel.

## Other Changes

### Improved performance of the linter

Converted the linter into using asynchronous processes, which should improve the overall performance and responsiveness of the diagnostics.

### Update native symbol provider

The native symbol provider (one used when `fortls` is not present) has been updated  
to use the new VS Code API.

### Changed Linter glob resolution module to `glob` from `fast-glob`

The `fast-glob` module was causing issues with the linter when using the `**` glob pattern. The parent directory would not be included in the results see, [https://github.com/mrmlnc/fast-glob/issues/47](https://github.com/mrmlnc/fast-glob/issues/47).

This was problematic since users had to define the include directories twice,  
once with the glob pattern and once without it. We have switched to the `glob`,  
which is slower but does not suffer from this issue.

The cache used by the linter should help mitigate any performance issues.

### Nightly Build Release Channel

We have introduced a Nightly Release Channel for the extension. This version is built and published every day at 00:00 UTC, allowing you to test the latest features and bug fixes as soon as they are merged.

## 🐛 Bug Fixes 🐛

For a complete list of bug fixes, please see the [CHANGELOG](https://github.com/fortran-lang/vscode-fortran-support/blob/main/CHANGELOG.md), this is just a very small curated summary.

- Fixed bug where the linter’s internal cache directory would not always exist  
([#698](https://github.com/fortran-lang/vscode-fortran-support/issues/698))
- Fixed brittle installation process of Python packages on Windows  
([#1121](https://github.com/fortran-lang/vscode-fortran-support/issues/1121))
- Fixed bug where formatting arguments would not be updated from settings.json  
([#1007](https://github.com/fortran-lang/vscode-fortran-support/issues/1007))
- Fixed bug where linter would not use the correct Fortran file association  
([#904](https://github.com/fortran-lang/vscode-fortran-support/issues/904))
- Fixed bug where custom line length arguments (e.g. `-ffree-line-length-none`) were overridden by defaults  
([#925](https://github.com/fortran-lang/vscode-fortran-support/issues/925))

---

<div class="post-metadata">

**Author:** ![jacobwilliams](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/jacobwilliams/32/10_2.png) [@jacobwilliams](https://fortran-lang.discourse.group/u/jacobwilliams)\
**Post date:** [January 9, 2026, 9:48pm UTC](https://fortran-lang.discourse.group/t/modern-fortran-for-vs-code-v4-0-0-release/10609/2 "2026-01-09T21:48:20Z")

</div>

Thank you and all who contributed! This is absolutely critical infrastructure for modern Fortran development. Thinking back to before this existed it was like the dark ages! Great work!
