hansec / fortran-language-server

Fortran Language Server for the Language Server Protocol
MIT License
294 stars 57 forks source link

'Unable to start the Fortran language server.' #215

Closed Lancashire3000 closed 2 years ago

Lancashire3000 commented 2 years ago

Hi,

I installed atom on Windows 10. When I started atom, it tells me,

Unable to start the Fortran language server.

This can occur if you do not have Python installed or if it is not in your path.

Also, make sure to install fortls by running:

pip install fortran-language-server

in cmd, I did python -m pip install fortran-language-server and got Requirement already satisfied: fortran-language-server in c:\users\user\appdata\local\programs\python\python38\lib\site-packages (1.12.0)

I set python in environment variables such that I can type python in any directory.

I also got

fortls language server for Fortran unable to start

Error: spawn fortls ENOENT

'fortls' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

not sure how to fix these issues.

gnikit commented 2 years ago

There should be an option in the Atom extension to specify the path to your fortls executable. Not sure where pip installs packages in Windows, if I had to guess I would say c:\users\user\appdata\local\programs\python\python38\bin\fortls. Basically you need to find fortls and point Atom to it.

Lancashire3000 commented 2 years ago

@gnikit Thanks! Sorry, where to set the path of fortls in Atom? I used 1.58.0x64. To the contrary in https://stackoverflow.com/questions/35546627/how-to-configure-atom-to-run-python3-scripts, there is no script under Packages. fortls is not in installed packages :(

gnikit commented 2 years ago

I don't use Atom, so I don't know the specifics. I assumed that there was some way for Atom to interface with fortls but it appears I was wrong.

The simplest thing to do is to add the directory where fortls is installed to you PATH variable. A quick Google search will give you the instructions on how to do that on Windows.

Lancashire3000 commented 2 years ago

Thanks! No warning message anymore!