Skip to main content

FORTRAN Language Server for the Language Server Protocol

Project description

https://travis-ci.org/hansec/fortran-language-server.svg?branch=master https://img.shields.io/github/license/hansec/fortran-language-server.svg

A FORTRAN implementation of the Language Server Protocol using Python (2.7+).

Note: This language server is currently in the early stages of development. Not all features are supported or planned.

Language Server Features

Document Symbols:

https://raw.githubusercontent.com/hansec/fortran-language-server/master/images/fortls_outline.png

Auto Completion:

https://raw.githubusercontent.com/hansec/fortran-language-server/master/images/fortls_autocomplete.gif

Go to definition:

https://raw.githubusercontent.com/hansec/fortran-language-server/master/images/fortls_gotodef.gif

Hover:

https://raw.githubusercontent.com/hansec/fortran-language-server/master/images/fortls_hover.gif

Installation

pip install fortran-language-server

Configuration

Project specific settings can be specified by placing a JSON file named .fortls (example below) in the root_dir directory.

Setup module search paths:

By default all files with the suffix f,F,f77,F77,for,FOR,fpp,FPP or f90,F90,f95,F95,f03,F03,f08,F08 in the root_dir directory, specified during initialization, and all its sub-directories are parsed and included in the project.

Directories and files can be excluded from the project by specifying their paths (relative to root_dir) in the excl_paths variable in .fortls file. Excluded directories also exclude all sub-directories.

Module directories can also be specified manually by specifying their paths (relative to root_dir) in the mod_dirs variable in .fortls file. When mod_dirs is specified directories are not added recursively, so any nested sub directories must be explicitly listed. However, root_dir does not need to be specified manually as it is always included.

{
  "mod_dirs": ["subdir1", "subdir2"],
  "excl_paths": ["subdir3", "subdir1/file_to_skip.F90"]
}

Bug reports

When filing bugs please provide example code to reproduce the observed issue.

License

This project is made available under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fortran-language-server-0.2.0.tar.gz (21.3 kB view details)

Uploaded Source

File details

Details for the file fortran-language-server-0.2.0.tar.gz.

File metadata

File hashes

Hashes for fortran-language-server-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ab985635b3393f00dc529ceb520914b6ae1b56e8c2c68587bad87b9f4cdabdd4
MD5 82b5747a6ace7e09b3749aa28504603f
BLAKE2b-256 4ca531169a0ed4a111e7bcc61970ac17360939fc06da72728eb24c376aa200b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page