{"id":23181525,"url":"https://github.com/rcorre/qmkfmt","last_synced_at":"2025-12-30T01:45:19.476Z","repository":{"id":268381282,"uuid":"903048241","full_name":"rcorre/qmkfmt","owner":"rcorre","description":"A formatter for QMK keymaps.","archived":false,"fork":false,"pushed_at":"2025-04-04T13:48:20.000Z","size":120,"stargazers_count":11,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-16T09:03:18.513Z","etag":null,"topics":["formatter","qmk"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/rcorre.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":"2024-12-13T20:23:10.000Z","updated_at":"2025-09-04T00:03:04.000Z","dependencies_parsed_at":"2024-12-16T12:34:23.009Z","dependency_job_id":"d10987c1-e7df-4845-90cf-33195108c466","html_url":"https://github.com/rcorre/qmkfmt","commit_stats":null,"previous_names":["rcorre/qmkfmt"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rcorre/qmkfmt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcorre%2Fqmkfmt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcorre%2Fqmkfmt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcorre%2Fqmkfmt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcorre%2Fqmkfmt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcorre","download_url":"https://codeload.github.com/rcorre/qmkfmt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcorre%2Fqmkfmt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000720,"owners_count":26082895,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","qmk"],"created_at":"2024-12-18T08:16:21.399Z","updated_at":"2025-10-09T01:35:07.966Z","avatar_url":"https://github.com/rcorre.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QMK Format\n\n`qmkfmt` is a tool to format the `keymaps` section of a `keymap.c` file in [qmk](https://qmk.fm/).\nIt formats each `LAYOUT` entry under `keymaps` into a grid with aligned columns.\n\nBug reports, feature requests, and contributions are welcome!\n\n# Installation\n\nPre-compiled binaries are available on the [releases page](https://github.com/rcorre/qmkfmt/releases).\n\nTo install the latest release from crates.io:\n\n```sh\ncargo install qmkfmt\n```\n\nTo install the latest from git:\n\n```sh\ncargo install --git https://github.com/rcorre/qmkfmt\n```\n\n# Behavior\n\n`qmkfmt` is designed to work out of the box with no configuration.\n`qmkfmt` infers the number of rows from the number of lines in each `LAYOUT`.\nIf a row has less than the maximum number of columns (e.g. a thumb cluster), it is centered.\n\nFor example, the following keymap:\n\n```c\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\nLAYOUT_split_3x6_3(\nKC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO,\nKC_NO, KC_NO, KC_NO,  KC_NO, KC_NO, KC_NO,\nKC_NO, KC_NO,   KC_NO, KC_NO,\nKC_NO,       KC_NO\n),\n```\n\nWould be reformatted as:\n\n```c\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\nLAYOUT_split_3x6_3(\n    KC_NO, KC_NO, KC_NO,         KC_NO, KC_NO, KC_NO,\n    KC_NO, KC_NO, KC_NO,         KC_NO, KC_NO, KC_NO,\n           KC_NO, KC_NO,         KC_NO, KC_NO,\n                  KC_NO,         KC_NO\n),\n```\n\nThe following keymap:\n\n```c\n[0] = LAYOUT_split_3x6_3(\nKC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_PIPE,\nKC_ESC,LALT_T(KC_A),RGUI_T(KC_S),LCTL_T(KC_D),LSFT_T(KC_F),KC_G,KC_H,RSFT_T(KC_J),RCTL_T(KC_K),RGUI_T(KC_L),RALT_T(KC_SCLN),KC_QUOT,\nKC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_RSFT,\nKC_SPC,LT(LYR_NAV, KC_TAB),KC_ESC,LT(1, KC_ENT),KC_BSPC,KC_ESC\n)\n```\n\nWill be reformatted to:\n\n```c\n[0] = LAYOUT_split_3x6_3(\n    KC_TAB,  KC_Q,         KC_W,         KC_E,         KC_R,                KC_T,   KC_Y,          KC_U,         KC_I,         KC_O,         KC_P,            KC_PIPE,\n    KC_ESC,  LALT_T(KC_A), RGUI_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F),        KC_G,   KC_H,          RSFT_T(KC_J), RCTL_T(KC_K), RGUI_T(KC_L), RALT_T(KC_SCLN), KC_QUOT,\n    KC_LSFT, KC_Z,         KC_X,         KC_C,         KC_V,                KC_B,   KC_N,          KC_M,         KC_COMM,      KC_DOT,       KC_SLSH,         KC_RSFT,\n                                         KC_SPC,       LT(LYR_NAV, KC_TAB), KC_ESC, LT(1, KC_ENT), KC_BSPC,      KC_ESC\n)\n```\n\nIf `clang-format` is available on `$PATH`, `qmkfmt` will invoke it to format the rest of the file.\nYou can pass `--clang-format=/path/to/clang-format` to use a specific `clang-format`, or `--no-clang-format` to disable this.\n\n# Configuration\n\nThe `--split-spaces` flag controls the given number of spaces in the center of each layout.\nPass `--split-spaces=0` if the keyboard is not split and you want no separation between halves.\n\n# Usage\n\n## CLI\n\nSimply run `qmkfmt path/to/keymap.c` to format the file inline.\nIf not given a path, `qmkfmt` reads `stdin` and writes to `stdout`.\n\n## Helix\n\nPut the following in `.helix/languages.toml` at the root of the `qmk_firmware` repository:\n\n```toml\n[[language]]\nname = \"c\"\nauto-format = true\nformatter = { command = \"qmkfmt\", args = [\"--split-spaces=8\"] }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcorre%2Fqmkfmt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcorre%2Fqmkfmt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcorre%2Fqmkfmt/lists"}