{"id":17312026,"url":"https://github.com/boris-code/clangformat-xcode","last_synced_at":"2025-03-27T01:14:34.698Z","repository":{"id":109039535,"uuid":"45667285","full_name":"Boris-code/ClangFormat-Xcode","owner":"Boris-code","description":null,"archived":false,"fork":false,"pushed_at":"2016-01-05T03:20:46.000Z","size":5544,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T06:27:42.693Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","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/Boris-code.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}},"created_at":"2015-11-06T07:44:48.000Z","updated_at":"2016-01-05T03:10:06.000Z","dependencies_parsed_at":"2023-03-17T00:15:46.488Z","dependency_job_id":null,"html_url":"https://github.com/Boris-code/ClangFormat-Xcode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boris-code%2FClangFormat-Xcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boris-code%2FClangFormat-Xcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boris-code%2FClangFormat-Xcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Boris-code%2FClangFormat-Xcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Boris-code","download_url":"https://codeload.github.com/Boris-code/ClangFormat-Xcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245761298,"owners_count":20667895,"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":[],"created_at":"2024-10-15T12:42:07.980Z","updated_at":"2025-03-27T01:14:34.678Z","avatar_url":"https://github.com/Boris-code.png","language":"Objective-C","readme":"# ClangFormat-Xcode\n\nAn Xcode plug-in to format your code using Clang's format tools, by [@travisjeffery](https://twitter.com/travisjeffery).\n\nWith [clang-format](http://clang.llvm.org/docs/ClangFormat.html) you can use Clang to format your code to styles such as LLVM, Google, Chromium, Mozilla, WebKit, or your own configuration.\n\n![usage](https://raw.github.com/travisjeffery/ClangFormat-Xcode/master/README/usage.png)\n\n![demo](https://raw.github.com/travisjeffery/ClangFormat-Xcode/master/README/clangformat-xcode-demo.gif)\n\n## Installation:\n\nInstall via [Alcatraz](https://github.com/mneorr/Alcatraz).\n\nOR\n\nClone this repo, build and run ClangFormat, restart Xcode.\n\n## Removing ClangFormat\n\nTo remove ClangFormat, run the following in your terminal:\n\n`rm -r \"~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/ClangFormat.xcplugin\"`\n\nOr just find the same file and move it to the trash. You'll need to restart Xcode after deleting the plugin.\n\n## Usage:\n\n### Format on save\n\nI.e., you press `command-s` and the file is formatted and wrote to disk.\n\nIn the menu, open Edit \u003e Clang Format \u003e Click Format on save (a checkmark appears in this menu item indicicating that the feature is active.)\n\n### Assign keyboard shortcuts\n\nYou can assign your own keyboard shortcuts like so:\n\n- Open the System Preferences \u003e Keyboard \u003e Shortcuts \u003e App Shortcuts \u003e Click +\n- Set the application to be Xcode\n- Set the menu title to an action title, e.g. \"Format File in Focus\"\n- Set your shortcut\n\nIn this example, we'll format the active file when `control-i` is pressed.\n\n![assign keyboard shortcut](https://raw.github.com/travisjeffery/ClangFormat-Xcode/master/README/assign-keyboard-shortcut.png)\n\n### Using your own style configuration\n\nBy using Clang Format \u003e File in the plug-in menu, Clang will look for the nearest `.clang-format` file from the input file. Most likely, you'll have a .clang-format file at the root of your project.\n\n[Here are the options for .clang-format and how they're configured](http://clang.llvm.org/docs/ClangFormatStyleOptions.html). Here's a [cool interactive website](http://clangformat.com/) to help you make your .clang-format file.\n\nIf one of the built-in styles is close to what you want, you can bootstrap your own configuration with:\n\n`./bin/clang-format -style=llvm -dump-config \u003e .clang-format`\n\nFor example, this .clang-format is similar to the [Linux Kernel style](https://www.kernel.org/doc/Documentation/CodingStyle):\n\n```\nBasedOnStyle: LLVM\nIndentWidth: 8\nUseTab: Always\nBreakBeforeBraces: Linux\nAllowShortIfStatementsOnASingleLine: false\nIndentCaseLabels: false\n```\n\nAnd this is similar to Visual Studio's style:\n\n```\nUseTab: Never\nIndentWidth: 4\nBreakBeforeBraces: Allman\nAllowShortIfStatementsOnASingleLine: false\nIndentCaseLabels: false\nColumnLimit: 0\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboris-code%2Fclangformat-xcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboris-code%2Fclangformat-xcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboris-code%2Fclangformat-xcode/lists"}