This installation process assumes a full version of Python has been installed on the machine.
Installing the Language Server
To build the language servel perform the following steps:
Open a command line prompt and install the language server by running the following command:
pip install fortran-language-server
Check the installation by runing the
command which should result in the following output:
usage: fortls [-h] [--version] [--nthreads NTHREADS] [--notify_init]
[--debug_log] [--debug_parser] [--debug_diagnostics]
[--debug_completion] [--debug_signature] [--debug_definition]
[--debug_hover] [--debug_implementation] [--debug_references]
[--debug_rename DEBUG_RENAME] [--debug_actions]
[--debug_rootpath DEBUG_ROOTPATH] [--debug_line DEBUG_LINE]
Server Batch File
Since Zeus itself can be scripted using Python the Zeus installation includes a cut down version of the Python interpreter.
However, this Fortran language server is Python based and it requires a full version of Python and as such a batch
file is needed to ensure these two versions of Python can run side by side.
Create the following
zLSP.cmd batch file, taking note of the folder location
of the file as that information will be needed in a later configuration step:
:: Point to the full Python installation
:: Echo the command about to be run
:: Run the language server
NOTE: The details found in this batch file may need to be adjusted to suit the local machine. For
example the Python installation folder or the version of Python installed may need to be adjusted.
Edit the Fortran document type and in the Language Server configuration
panel apply the following configuration settings:
Program Type: Batch
Directory: The folder location of the zLSP.cmd file
Using the Language Server
To test the configuration create a simple
test.f90 file and fire off an auto-complete request: