fortran-lang/vscode-fortran-support

fix lookup of formatters on Windows

michaelkonecny opened this issue · 1 comments

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:

  • %appdata%\Python\bin for findent
  • %appdata%\Python\PythonXY\Scripts for fprettify

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.

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