Feature requests for VS Code Modern Fortran and fortls Language Server

Hi All,

I am the main dev and maintainer of the VS Code Modern Fortran extension and fortls Fortran Language Server (forked from hansec’s original implementation of LSP in fortran-language-server).

I thought I would pop in and say hello and that I am here to help if you are having any problems either with Modern Fortran or fortls.

I would also like to extend an invitation to anyone who has any feature requests (e.g. snippets they would like to see) or bugs to report

The plan is to release v3.0 of Modern Fortran in the next coming months (basically whenever I find some free time from my PhD), which will introduce a series of new features like

  • linting support for ifort and flang (the latter is to be implemented)
  • Improved integration with the fortls Language Server
  • Various syntax highlighting fixes and bug fixes
  • and General performance improvements

These features are already available in the preRelease version of the extension for users to test.

Similarly, I am planning on including a bunch of new cool features and bug fixes to the fortls Language Server, when I get the chance.

Also, I think I should mention that I am quite busy at the moment and I find myself with increasingly less time to maintain and develop these tools, so anyone who feels like doing some light dev work is more than welcome to contribute to any of the two projects.


Welcome to the Discourse. I’ve been a very happy user of fortls, albeit with Atom instead of VS Code.


Any tutorial for beginners available? I’ve only found C/C++ tutorial for Emacs but it is pretty C-specific.

Do you want a tutorial for EMACS with fortls, or for VS Code with fortls?

For VS Code it should be plug and play for any OS (as long as you have pip installed and reachable in your $PATH). The extension will prompt you to install any necessary packages through pip, i.e. fortls and formatters.

For anything else the general steps are:

  1. Install an extension for your editor (if not present by default) for Fortran. The extension should be responsible for implementing the client side of the Language Server Protocol (LSP), VS Code, Atom, (Neo)Vim and EMACS all support LSP either natively or through plugins.
  2. install fortls: pip install fortls

Hello Giannis Nikiteas,
I’m using vscode and Modern Fortran on windows, and when I type in my native language (Chinese) in comment, this error occurs: Change request failed for file “xx\xx\xx\xx*.f90”: Could not apply change. Source: Modern Fortran (Extension). Do you have any idea about what caused this false warning?
vscode version: 1.85.2, Modern Fortran version: v3.2.0, System: windows 11.