I use VS Code to write and edit .py scripts on Gadi. I recently found plugin Prettier that automatically formats the scripts and I’d like to be able to use it in the remote sessions, too. May I know if it’s installed or request it to be installed on a remote server? Or should I contact NCI regarding this?
In VSCode you can also install the ms-python.black-formatter extension, and you can also install it on Gadi.
If you want to use a specific black executable you can do it by inserting its path in the Black-formatter: Path extension settings (on Remote).
For example, to select black from the hh5ananlysis3 conda environment, you can write the following in the Black-formatter: Path extension settings:
Also, you have to set ms-python.black-formatter as the default editor formatter (at least for Python). You can also add the options to automatically format the code while typing, and on save.
To set these options you can open the VScode settings.json (Shift+Ctrl/Cmd+P and type “open user settings (JSON)”) and add the following lines: