Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After fixing "fortls could not be spawned" ide-fortran still not working #11

Closed
benjaminlarin opened this issue Jan 24, 2019 · 11 comments
Closed

Comments

@benjaminlarin
Copy link

Dear ide-fortran developers,

first I got the error

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

This is the same error message as described in this previous issue, but the error appears always when starting Atom, independent of whether a Fortran file is currently opened or not.

Following the recommendation in the previous issue I put "/home/USERNAME/.local/lib/python2.7/site-packages/" into the field "FORTRAN Language Server Path" under settings. The error message do not appear anymore.

However, ide-fortran does not seem to be working, i) Outline shows

No outline available this is likely an error with the language package,

ii) hovering does not work, iii) autocomplete does not work, ...

My configuration:
Ubuntu 16.04.5 LTS
Atom 1.33.0 x64
ide-fortran 0.3.0
fortran-language-server 0.9.3

Ubuntu 16.04 has both Python 2.7 and 3.5 installed. I have installed the language fortran package for both and I also tried "/home/USERNAME/.local/lib/python3.5/site-packages/". Same results.

Please let me know if I can provide any further information for debugging.

@hansec
Copy link
Owner

hansec commented Jan 24, 2019

How did you install the language server? Did you use pip?

Can you run the command fortls --help from a terminal? If the command fortls is accessible from a terminal, use the which command to get the full path to the installed fortls script and put that in the "FORTRAN Language Server Path" setting. Note, that the installed executable script and the installed Python package are not the same.

@benjaminlarin
Copy link
Author

Thanks for the quick reply.

I installed it with pip install fortran-language-server. However, fortls --help gives me fortls: command not found. Although that seems now to be an issue related to the installation of fortls, it would be great if you can tell me where the executable script is located in Ubuntu 16.04 (I haven't found that out).

@hansec
Copy link
Owner

hansec commented Jan 25, 2019

On my Ubuntu, and some other Linux versions, pip installs scripts to /home/USERNAME/.local/bin.

@benjaminlarin
Copy link
Author

Thanks a lot. That solved the problem.

A minor (different) bug remains, though, but I have created a new issue.

@Qing-sudo
Copy link

Hi all, I just got the same issue: after I installed fortran-language-server, the out line function still didn't seem to work. The 'fortls --help' did work but I wonder how do I put its full path to the "FORTRAN Language Server Path" ? Would be most grateful if I can get any tips from you guys.

@hansec
Copy link
Owner

hansec commented Aug 27, 2019

@Qing-sudo Are you getting an error that the language server cannot be found?

There is a known issue with the underlying IDE functionality of Atom that prevents the outline from being displayed sometimes. Unfortunately, I am not sure when or if this will be fixed since the IDE functionality is currently up in the air after development of it was abandoned by Facebook. I expect it will be picked up again by the community, but right now that is a little up in the air since the GitHub repo has been archived.

@Qing-sudo
Copy link

Thanks for the quick reply. And yes when I opened an outline pane, it reported error in finding the language sever. Except for all current issues related to IDE functionality, I’m trying to add my language server path to Atom path. But I didn’t get any results by using ‘which Atom’ in my Mac terminal. Didn’t I install Atom in a proper way? It would be great if any information about Atom path or how do I move a language sever to the Atom directory can be provided :)

@hansec
Copy link
Owner

hansec commented Aug 28, 2019

You should use 'which fortls' to get the path to the language server. Then use that to set the path to the language server in the settings for the "ide-fortran" package.

@Qing-sudo
Copy link

Thanks a lot for this info. As it still didn't work, I'm going to try another way. Thanks again!

@xushanthu-2014
Copy link

I encountered the same issue, and when I used fortls --help, it was said -bash: fortls: command not found. And which fortls returned no values. I installed fortls by pip3 install fortran-language-server.

@IngFelixSchaf
Copy link

Same Problem here, Fortran Code did compile on VS Code on my old MacBook Pro M1, on my new MacBook Pro M1 Pro it doesn't. Same settings, fortls installed via pip3, fortls commands seem to be available. Now the error "Error launching fortls: Please check that all selected options are supported by your language server version." occurs. Have no idea what to do....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants