Skip to content
New issue

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

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

Already on GitHub? # to your account

Formatter and Fortran Server do not install #354

Closed
sindizzy opened this issue Jan 17, 2022 · 8 comments
Closed

Formatter and Fortran Server do not install #354

sindizzy opened this issue Jan 17, 2022 · 8 comments

Comments

@sindizzy
Copy link

First, thanks for such a great extension. I use it on every machine I have and it has been a life saver.

So I have installed Python 3.10 and also VS Code. I then installed the Modern Fortran extension.

When I open a F90 file with VS Code it displays a message that the fortran language server is not installed. Wen I right-click my document and choose Format Document it displays a message that findent is not installed. I click on the Install button on the message but nothing seems to happen.

In the terminal I have confirmed that all packages are installed. I cant quite figure out what I am doing wrong.

PS C:\Users\Dude> pip install fortran-language-server
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: fortran-language-server in c:\users\Dude\appdata\roaming\python\python310\site-packages (1.12.0)
PS C:\Users\Dude> pip install --upgrade findent
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: findent in c:\users\Dude\appdata\roaming\python\python310\site-packages (4.1.3)
PS C:\Users\Dude> pip install --upgrade fprettify
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: fprettify in c:\users\Dude\appdata\roaming\python\python310\site-packages (0.3.7)
Requirement already satisfied: configargparse in c:\Dude\467803\appdata\roaming\python\python310\site-packages (from fprettify) (1.5.3)

@gnikit
Copy link
Member

gnikit commented Jan 17, 2022

So I think that in Windows programs installed through pip e.g. fortran-language-server or findent might not necessarily be on the PATH.

If you can figure out where fortls and findent are installed (should be pretty straight forward), you can then add that location in your PATH variable for VS Code to then detect.

I suspect that the location of the binaries should be somewhere under c:\users\Dude\appdata\roaming\python\python310
in a folder called bin

@gnikit
Copy link
Member

gnikit commented Jan 17, 2022

As for the missing output once installing, apologies for that. I have gone ahead and fixed in version 3.0.0 which is in a prerelease state. There are a few more things that I need to iron out before I release it on the VS Store.

@sindizzy
Copy link
Author

oooooooooooooooooooooooo I see now. First I was very confused as to why it kept being referred to as binaries when all I saw was scripts. No EXEs.

I thought the path was supposed to be C:\Users\Dude\AppData\Roaming\Python\Python310\site-packages. When in fact it should be C:\Users\467803\AppData\Roaming\Python\Python310\Scripts. That's where I see all the binaries, the EXEs.

image

Second, I did ask the installer to add the Python to PATH but it was the one under Program Files which for some reason is not writeable. I ran VS Code under admin so not sure what happened. But anyway I will now add the user location to PATH and/or under the extension setting.

image

I will report back.

@sindizzy
Copy link
Author

I couldn't get the findent formatter to work. I tried several combinations of installing Python and VS Code as user and as admin and nothing seemed to work. Would like to see if anybody on Windows has been able to get the findent/fprettify formatters to work and how?

Thanks

@gnikit
Copy link
Member

gnikit commented Jan 19, 2022

Oh that might actually be my bad, I just realised that findent on Windows might actually need to be findent.exe instead.

@sindizzy
Copy link
Author

if you want me to test I can do that. fprettify wasn't working either.

@gnikit
Copy link
Member

gnikit commented Jan 22, 2022

I will add that on the todo-list for the next pre-release. Should be coming out later today.

gnikit added a commit that referenced this issue Jan 26, 2022
Closes Formatter and Fortran Server do not install #354
@gnikit gnikit mentioned this issue Jan 26, 2022
8 tasks
@gnikit
Copy link
Member

gnikit commented Jan 26, 2022

Hopefully that should be fixed in the pre-release version I just issued.

@gnikit gnikit closed this as completed Jan 26, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants