{"id":24083261,"url":"https://github.com/mitranim/sublime-rust-fmt","last_synced_at":"2025-04-30T18:23:01.247Z","repository":{"id":50128496,"uuid":"92590160","full_name":"mitranim/sublime-rust-fmt","owner":"mitranim","description":"Sublime Text plugin that formats Rust code with rustfmt","archived":false,"fork":false,"pushed_at":"2021-09-08T10:25:22.000Z","size":40,"stargazers_count":30,"open_issues_count":1,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-03T05:05:48.370Z","etag":null,"topics":["formatter","formatter-plugin","plugin","rust","sublime-text","sublime-text-plugin"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitranim.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-27T09:59:16.000Z","updated_at":"2024-11-20T19:42:10.000Z","dependencies_parsed_at":"2022-09-13T16:01:18.637Z","dependency_job_id":null,"html_url":"https://github.com/mitranim/sublime-rust-fmt","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fsublime-rust-fmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fsublime-rust-fmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fsublime-rust-fmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitranim%2Fsublime-rust-fmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitranim","download_url":"https://codeload.github.com/mitranim/sublime-rust-fmt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233275539,"owners_count":18651573,"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":["formatter","formatter-plugin","plugin","rust","sublime-text","sublime-text-plugin"],"created_at":"2025-01-09T23:56:12.580Z","updated_at":"2025-01-09T23:56:13.266Z","avatar_url":"https://github.com/mitranim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Overview\n\nRustFmt is a Sublime Text 3 plugin that auto-formats Rust code with [`rustfmt`](https://github.com/rust-lang-nursery/rustfmt) or another executable.\n\nUnlike `BeautifyRust`, it's fast and works on buffers that have yet not been saved as files. Unlike `RustFormat`, it preserves the buffer scroll position. It also supports `rustfmt.toml`.\n\n## Dependencies\n\nRequires Sublime Text version 3124 or later.\n\nRequires [`rustfmt`](https://github.com/rust-lang/rustfmt) to be on [PATH](https://en.wikipedia.org/wiki/PATH_(variable)). Installation:\n\n```sh\nrustup component add rustfmt\n```\n\n## Installation\n\n### Package Control\n\n1. Get [Package Control](https://packagecontrol.io)\n2. Open command palette: `Shift+Super+P` or `Shift+Ctrl+P`\n3. `Package Control: Install Package`\n4. `RustFmt`\n\n### Manual\n\nClone the repo:\n\n```sh\ngit clone https://github.com/mitranim/sublime-rust-fmt.git\n```\n\nThen symlink it to your Sublime packages directory. Example for MacOS:\n\n```sh\nmv sublime-rust-fmt RustFmt\ncd RustFmt\nln -sf \"$(pwd)\" \"$HOME/Library/Application Support/Sublime Text 3/Packages/\"\n```\n\nTo find the packages directory, use Sublime Text menu → Preferences → Browse Packages.\n\n## Usage\n\nBy default, RustFmt will autoformat files before saving. You can trigger it\nmanually with the `RustFmt: Format Buffer` command in the command palette.\n\nIf the plugin can't find the executable:\n\n  * run `which rustfmt` to get the absolute executable path\n  * set it as the `executable` setting, see [Settings](#settings) below\n\nOn MacOS, it might end up like this:\n\n```sublime-settings\n  \"executable\": [\"/Users/username/.cargo/bin/rustfmt\"]\n```\n\nCan pass additional arguments:\n\n```sublime-settings\n  \"executable\": [\"rustup\", \"run\", \"nightly\", \"rustfmt\"]\n```\n\n## Settings\n\nSee [`RustFmt.sublime-settings`](RustFmt.sublime-settings) for all available settings. To override them, open:\n\n```\nPreferences → Package Settings → RustFmt → Settings\n```\n\nRustFmt looks for settings in the following places:\n\n  * `\"RustFmt\"` dict in general Sublime settings, possibly project-specific\n  * `RustFmt.sublime-settings`, default or user-created\n\nThe general Sublime settings take priority. To override them on a per-project basis, create a `\"RustFmt\"` entry:\n\n```sublime-settings\n  \"RustFmt\": {\n    \"format_on_save\": false\n  },\n```\n\n## Commands\n\nIn Sublime's command palette:\n\n* `RustFmt: Format Buffer`\n\n## Hotkeys\n\nTo avoid potential conflicts, this plugin does not come with hotkeys. To hotkey\nthe format command, add something like this to your `.sublime-keymap`:\n\n```sublime-keymap\n{\n  \"keys\": [\"ctrl+super+k\"],\n  \"command\": \"rust_fmt_format_buffer\",\n  \"context\": [{\"key\": \"selector\", \"operator\": \"equal\", \"operand\": \"source.rust\"}]\n}\n```\n\n## License\n\nhttps://en.wikipedia.org/wiki/WTFPL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitranim%2Fsublime-rust-fmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitranim%2Fsublime-rust-fmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitranim%2Fsublime-rust-fmt/lists"}