{"id":25694941,"url":"https://github.com/Davphla/clang-format-epitech","last_synced_at":"2025-02-25T00:02:02.859Z","repository":{"id":258665976,"uuid":"867772071","full_name":"Davphla/clang-format-epitech","owner":"Davphla","description":"Automatic formatting configuration for Epitech coding style for C/C++ ","archived":false,"fork":false,"pushed_at":"2024-12-10T16:44:45.000Z","size":40,"stargazers_count":23,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T15:48:28.535Z","etag":null,"topics":["c","clang-format","coding-style","cpp","epitech","format"],"latest_commit_sha":null,"homepage":"","language":null,"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/Davphla.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-04T17:31:14.000Z","updated_at":"2025-01-25T14:56:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"2c15a004-6d0a-481b-9e91-e807e6baeeb7","html_url":"https://github.com/Davphla/clang-format-epitech","commit_stats":null,"previous_names":["davphla/clang-format-epitech"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2Fclang-format-epitech","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2Fclang-format-epitech/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2Fclang-format-epitech/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Davphla%2Fclang-format-epitech/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Davphla","download_url":"https://codeload.github.com/Davphla/clang-format-epitech/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240576457,"owners_count":19823293,"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":["c","clang-format","coding-style","cpp","epitech","format"],"created_at":"2025-02-25T00:01:37.430Z","updated_at":"2025-02-25T00:02:02.824Z","avatar_url":"https://github.com/Davphla.png","language":null,"funding_links":[],"categories":["Epitech Tools"],"sub_categories":["Language related"],"readme":"# Clang-Format Configuration\n\nThis repository contains a `.clang-format` configuration file for formatting C, C++, and other related source code files. This file can be used with various editors and IDEs to ensure consistent code style across your projects.\n \n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Visual Studio Code (VSCode)](#visual-studio-code-vscode)\n  - [Emacs](#emacs)\n  - [Neovim (nvim)](#neovim-nvim)\n  - [Command Line](#command-line)\n- [Customizing the Configuration](#customizing-the-configuration)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n1. Ensure you have `clang-format` installed. You can install it via your package manager:\n   - **Ubuntu**: `sudo apt install clang-format`\n   - **macOS**: `brew install clang-format`\n   - **Arch**: `sudo pacman -S clang`\n   - **Other**: Download from the [LLVM releases page](https://releases.llvm.org/download.html).\n\n2. Copy the .clang-format file to your project root for consistency with your teammates, or to your home directory (~) for global use.\n\n```bash\ncurl -o ~/.clang-format https://raw.githubusercontent.com/Davphla/clang-format-epitech/refs/heads/main/.clang-format\n```\n## Usage\n\n### Visual Studio Code (VSCode)\n\n1. Install the **C/C++** extension from the Extensions Marketplace.\n2. Open your workspace settings and change (if needed) the following configuration in settings:\n   ```json\n   {\n       \"C_Cpp.clang_format_style\": \"file\"\n   }\n   ```\n3. Now, you can use `Ctrl + Shift + I` to format the current document. \n3. Or you can also format your code using the command palette (`Ctrl + Shift + P`) and typing `Format Document`.\n\n### Emacs\n\n1. Install the `clang-format` package if you haven't already.\n2. Add the following to your Emacs configuration file (`.emacs` or `init.el`):\n   ```elisp\n   (require 'clang-format)\n   (global-set-key (kbd \"C-c C-f\") 'clang-format-region)\n   ```\n3. You can format the current region or buffer by using `C-c C-f`.\n\n### Neovim (nvim)\n\n1. Install the `clang-format` plugin using your preferred plugin manager (e.g., `vim-plug`):\n   ```vim\n   Plug (\"sbdchd/neoformat\")\n   ```\n2. Add the following configuration to your `init.vim` or `init.lua`:\n   ```vim\n   vim.cmd(\"autocmd FileType c,cpp setlocal formatprg=clang-format\")\n   ```\n3. You can format your code by running `:Neoformat`.\n\n### Command Line\n\nYou can also use `clang-format` directly from the command line. Navigate to your project directory and run:\n```bash\nclang-format -i \u003cfilename\u003e\n```\nReplace `\u003cfilename\u003e` with the name of the file you want to format. The `-i` flag edits the file in place.\n\n## Customizing the Configuration\n\nYou can customize the `.clang-format` file to suit your coding style preferences. Refer to the [Clang-Format Style Options](https://clang.llvm.org/docs/ClangFormatStyleOptions.html) for a comprehensive list of available options. \n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue if you have suggestions or improvements.\n\n---\n\nFeel free to modify this README to better fit your project's needs!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavphla%2Fclang-format-epitech","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDavphla%2Fclang-format-epitech","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDavphla%2Fclang-format-epitech/lists"}