|
Oktatás * Programozás 1 * Szkriptnyelvek Teaching * Programming 1 (BI) Félévek Linkek * kalendárium |
Nim2 /
AutoformatNim also has a code beautifier (like Ruff for Python); it's called nph. Installation: $ nimble install nph Basic usage: $ nph ugly.nim It modifies the file in place. VS Code integrationIf you want to integrate it in VS Code, i.e. whenever you save your source code, you want it to be autoformatted, then add these lines to your "emeraldwalk.runonsave": { "commands": [ { "match": "\\.nim$", "isAsync": false, "cmd": "cd '${fileDirname}' && nph '${fileBasename}'" } ] } It requires the Run on Save VS Code extension. This extension allows configuring commands that get run whenever a file is saved. |
![]() Blogjaim, hobbi projektjeim * The Ubuntu Incident [ edit ] |