Skip to content

Extension for vscode to add support for fortran language

License

Notifications You must be signed in to change notification settings

daverous/vscode-fortran-support

Repository files navigation

Modern Fortran language support for VSCode

Build Status codecov

This extension provides support for the Fortran programming language. It includes syntax highlighting, code snippets and a linting based on ifort.

Features

  • Syntax highlighting
  • Code Snippets
  • Documentation on hover for intrisic functions
  • Code linting based on ifort to show errors swiggles in your code
  • Code autocompletion (beta)
  • Symbols provider (just functions for now)

symbol_nav

Settings

You can control the include paths to be used by the linter with the fortran.includePaths setting.

{
    "fortran.includePath": [
        "/usr/local/include",
         "/usr/local"
    ]
}

By default the ifort executable is assumed to be found in the path. In order to use a different one or if it can't be found in the path you can point the extension to use a custom one with the fortran.fortranCompilerExecutable setting.

{
    "fortran.fortranCompilerExecutable": '/usr/local/bin/ifort',
}

If you want to pass extra options to the ifort executable or override the default one, you can use the setting fortran.linterExtraArgs. By default -warn all is the only option.

{
    "fortran.linterExtraArgs": ['-warn all'],
}

Snippets

This is a list of some of the snippets included, if you like to include some additionals snippets please let me know and I will add them.

Program skeleton

program snippet

Module skeleton

module snippet

Error swiggles

To trigger code validations you must save the file first.

Requirements

For the linter to work you need to have ifort on your path, or wherever you configure it to be.

Issues

Please report any issues and feature request on the github repo here

Notice

The syntax highlight support was imported from TextMate bundle

The idea of using ifort cames from this awesome fortran plugin for Sublime Text.

This is a fork of the repo https://github.com/krvajalmiguelangel/vscode-fortran-support, but with better syntax highlighting and ifort support rather than VS code.

LICENSE

MIT

About

Extension for vscode to add support for fortran language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages