{"id":17693377,"url":"https://github.com/ttytm/nimpretty_t","last_synced_at":"2025-07-25T13:12:41.441Z","repository":{"id":183951686,"uuid":"614749505","full_name":"ttytm/nimpretty_t","owner":"ttytm","description":"Nim formatter that utilizes `nimpretty` while allowing for tab indentation and diff viewing.","archived":false,"fork":false,"pushed_at":"2024-10-01T15:02:55.000Z","size":43,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T03:18:24.406Z","etag":null,"topics":["autoformat","formatter","nim","nim-lang","nimble","nvim","pretty-print","vscode"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ttytm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-16T08:39:12.000Z","updated_at":"2024-10-01T15:03:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"70e4e2de-9dbf-4bea-b9da-1016b8996fe4","html_url":"https://github.com/ttytm/nimpretty_t","commit_stats":null,"previous_names":["ttytm/nimpretty_t"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2Fnimpretty_t","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2Fnimpretty_t/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2Fnimpretty_t/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ttytm%2Fnimpretty_t/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ttytm","download_url":"https://codeload.github.com/ttytm/nimpretty_t/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253863177,"owners_count":21975596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoformat","formatter","nim","nim-lang","nimble","nvim","pretty-print","vscode"],"created_at":"2024-10-24T13:44:52.591Z","updated_at":"2025-05-13T03:18:30.466Z","avatar_url":"https://github.com/ttytm.png","language":"Nim","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nimpretty_t\n\n[badge__build]: https://img.shields.io/github/actions/workflow/status/ttytm/nimpretty_t/ci.yml?branch=main\u0026logo=github\u0026logoColor=C0CAF5\u0026labelColor=333\n[badge__version]: https://img.shields.io/github/v/release/ttytm/nimpretty_t?logo=task\u0026logoColor=C0CAF5\u0026labelColor=333\u0026color=ffc200\n\n[![][badge__build]](https://github.com/ttytm/nimpretty_t/actions?query=branch%3Amain)\n[![][badge__version]](https://github.com/ttytm/nimpretty_t/releases/latest)\n\nUses `nimpretty` to format Nim code while allowing for tab indentation and diff viewing.\n\n## Quick start\n\n- [Installation](#installation)\n- [Editor Setup](#editor-setup)\n  - [Neovim](#neovim)\n  - [VS Code / Codium](#vs-code--codium)\n\n## Overview\n\n### Usage\n\n```\nUsage: nimpretty_t [options] \u003cpath\u003e...\n\nFormatter and diff viewer utilizing nimpretty.\nBy default, formatted output is written to stdout.\n\nOptions:\n  -w  --write           Modifies non-conforming files in-place.\n  -l  --list            Prints paths of non-conforming files. Exits with an error if any are found.\n  -d  --diff            Prints differences of non-conforming files. Exits with an error if any are found.\n  -i  --indentation     Sets the indentation used [possible values: 'tabs', 'smart', '\u003cnum\u003e'(spaces)].\n                        - tabs: used by default.\n                        - smart: based on the initial indentations in a file.\n                        - \u003cnum\u003e: number of spaces.\n  -L  --line-length     Sets the max character line length. Default is 100.\n      --stdin           Formats input from stdin.\n  -h  --help            Prints this help information.\n  -v  --version         Prints version information.\n\nEnvironment Variables:\n  NIM_DIFF_CMD          Sets a custom diff command that is used with the '-diff' option\n                        E.g.: 'NIM_DIFFCMD=\"diff --color=always -U 2\"'\n```\n\n## Getting Started\n\n### Installation\n\n- Via nimble\n\n  ```sh\n  nimble install nimpretty_t\n  ```\n\n- Pre-built binaries can be downloaded from the [release page](https://github.com/ttytm/nimpretty_t/releases).\n\n  - [GNU/Linux](https://github.com/ttytm/nimpretty_t/releases/latest/download/nimpretty_t-linux-amd64)\n  - [Windows](https://github.com/ttytm/nimpretty_t/releases/latest/download/nimpretty_t-windows-amd64.exe)\n  - [macOS (arm64)](https://github.com/ttytm/nimpretty_t/releases/latest/download/nimpretty_t-macos-arm64)\n  - [macOS (amd64)](https://github.com/ttytm/nimpretty_t/releases/latest/download/nimpretty_t-macos-amd64)\n\n### Editor Setup\n\n- #### Neovim\n\n  Register `nimpretty_t` in `null-ls`/`none-ls`\n\n  ```lua\n  local null_ls = require(\"null-ls\")\n  -- ...\n  null_ls.register({\n  \tname = \"nimpretty_t\",\n  \tmethod = null_ls.methods.FORMATTING,\n  \tfiletypes = { \"nim\" },\n  \tgenerator = null_ls.formatter({\n  \t\tcommand = \"nimpretty_t\",\n  \t\targs = { \"-w\", \"$FILENAME\" },\n  \t\tto_temp_file = true,\n  \t}),\n  })\n  ```\n\n  A complementary tool regarding indentation for neovim is [tabs-vs-spaces.nvim](https://github.com/tenxsoydev/tabs-vs-spaces.nvim)\n\n- #### VS Code / Codium\n\n  Since nimpretty_t is a niche project in the Nim community, it is not yet clear whether it will have a user base that can benefit from its own VS Code extension.\n  To save efforts the extension has not yet been completed. Until then, please use the `Run on Save` extension from emeraldwalk.\n\n  ```jsonc\n  // settings.json\n  // ...\n  \"emeraldwalk.runonsave\": {\n  \t\"commands\": [\n  \t\t{\n  \t\t\t\"match\": \"\\\\.nim$\",\n  \t\t\t\"isAsync\": true,\n  \t\t\t\"cmd\": \"nimpretty_t -w ${file}\"\n  \t\t}\n  \t]\n  }\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttytm%2Fnimpretty_t","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fttytm%2Fnimpretty_t","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fttytm%2Fnimpretty_t/lists"}