Skip to content

hansec/vscode-fortran-ls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fortran IntelliSense package

vs marketplace downloads rating

Fortran IntelliSense (IDE functionality) support for VSCode, powered by the Fortran Language Server.

Features

  • Document outline
  • Completion
  • Signature help
  • GoTo/Peek definition
  • GoTo implementation
  • Hover
  • Find/Peek references
  • Project-wide symbol search
  • Symbol renaming
  • Documentation parsing (Doxygen and FORD styles)
  • Diagnostics
    • Multiple definitions with the same variable name
    • Variable definition masks definition from parent scope
    • Missing subroutine/function arguments
    • Unknown user-defined type used in "TYPE"/"CLASS" definition (only if visible in project)
    • Unclosed blocks/scopes
    • Invalid scope nesting
    • Unknown modules in "USE" statement
    • Unimplemented deferred type-bound procedures
    • Use of unimported variables/objects in interface blocks
    • Statement placement errors ("CONTAINS", "IMPLICIT", "IMPORT")
  • Code actions [Experimental, must be enabled in settings]
    • Generate type-bound procedures and implementation templates for deferred procedures

See Fortran Language Server for examples and more details. There is also a companion package for the Atom text editor.

Examples:

Autocomplete in Fortran IntelliSense

Hover definition in Fortran IntelliSense

Peek definition in Fortran IntelliSense

Requirements

This package requires the following extensions to be installed:

Additionally, you must have Python and the Fortran Language Server installed on your system. Be sure to periodically update the underlying language server to stay up to date with new features and fixes.

This package has been tested and should work on 🍎 macOS (OS X), 🐧 Linux and Windows.

Configuration

Note: When setting an explicit language server executable path on Windows backslashes must be escaped (ex. C:\\path\\to\\fortls.exe).

Due to Fortran's syntax it is recommended that you disable the Enter key for suggestion confirmation. This can be done selectively in fortran files by adding the snippet below to your settings.json file.

"[fortran]": {
    "editor.acceptSuggestionOnEnter": "off"
},
"[fortran_fixed-form]": {
    "editor.acceptSuggestionOnEnter": "off"
},
"[FortranFreeForm]": {
    "editor.acceptSuggestionOnEnter": "off"
}

See the fortran-language-server README for information on project specific configuration settings.

Bug reports

Note that most bugs observed with this package are actually related to the upstream fortran-language-server. Unless you believe the error you observe is directly related to Visual Studio Code please submit issues to the upstream repo. When filing bugs please provide example code to reproduce the observed issue if possible.

License

MIT License. See the license for more details.

Support

If you really like Fortran IntelliSense or the underlying language server you can buy me a ☕ or a 🍺 to say thanks.

About

Fortran IntelliSense for Visual Studio Code

Resources

License

Stars

Watchers

Forks

Packages

No packages published