Skip to content

Kotz-dev/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Dotfiles

Currently includes configurations for C++.

Personal repository of development configurations and templates, reused across different projects.

Demo

See clang-format in action, automatically transforming messy code:

Basic formatting (spacing, braces, indentation)

Demo: basic formatting

Long function parameters (one per line)

Demo: parameter wrapping

Automatic include sorting

Demo: include sorting

clang-format

C++ style configuration based on LLVM, with adjustments for professional projects:

  • 4-space indentation, Allman-style braces
  • Function parameters always one per line when they don't fit the column limit (makes PR review easier)
  • Automatic #include sorting (std headers → local headers)
  • No vertical alignment of =/declarations (avoids huge Git diffs)
  • Constructor initializer lists properly formatted (: member(value))

How to use

  1. Copy the desired file, for example:

    clang-format/cpp.clang-format
    
  2. Paste it into the root of your project and rename it to:

    .clang-format
    

    Important: the name must start with a dot and have nothing before it (.clang-format, not cpp.clang-format).

  3. Use Ctrl+Alt+L to format any file in the project.


Maintained by Kotz-dev

About

My configuration templates for C++ projects.

Topics

Resources

Stars

Watchers

Forks

Contributors