fortran-lang / vscode-fortran-support

Fortran language support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=fortran-lang.linter-gfortran
MIT License
221 stars 30 forks source link

fix lookup of formatters on Windows #773

Open michaelkonecny opened 1 year ago

michaelkonecny commented 1 year ago

The extension currently won't find fprettify or findent on Windows, unless they're installed in the system directory (%programfiles%\PythonXY\...) which requires admin privileges.

When installed with the --user argument (which is what the extension does), they're installed in %appdata%\Python\... which is typically not in PATH.

On Windows, that's where the extension should look for the executables, specifically to:

This has already been fixed for fortls lookup in PR #772, so if the request gets merged, it should be done in a similar fashion for the formatters.

Milagr0s commented 1 year ago

yes,I add %appdata%\Python\bin in User Level Path,and move it in top, then the extension find findent.exe by the way,I add "fortran.formatting.path": "",it seems doesnt work,my pc install two python.exe,maybe find another python.exe hopeful my experience useful