diff --git a/dotfiles/bash/scripts/cgen.sh b/dotfiles/bash/scripts/cgen.sh index 1d9344a..c4e8443 100755 --- a/dotfiles/bash/scripts/cgen.sh +++ b/dotfiles/bash/scripts/cgen.sh @@ -72,10 +72,10 @@ echo "add_executable($name \${SOURCE} \${INCLUDE})" >> $cmake_config echo "Copying .clang-format..." -cp $script_dir/cgen_etc/template_clang_format $name/.clang-format +cp $script_dir/cgen_etc/clang_format_template $name/.clang-format echo "Copying .gitignore..." -cp $script_dir/cgen_etc/template_gitignore $name/.gitignore +cp $script_dir/cgen_etc/gitignore_template $name/.gitignore sample_file=$name/src/main.c diff --git a/dotfiles/bash/scripts/cgen_etc/clang_format_template b/dotfiles/bash/scripts/cgen_etc/clang_format_template new file mode 100644 index 0000000..94ff769 --- /dev/null +++ b/dotfiles/bash/scripts/cgen_etc/clang_format_template @@ -0,0 +1,13 @@ +AlignConsecutiveAssignments: 'true' +AlignTrailingComments: 'true' +AllowShortBlocksOnASingleLine: 'false' +AllowShortCaseLabelsOnASingleLine: 'false' +AllowShortFunctionsOnASingleLine: None +AllowShortIfStatementsOnASingleLine: Never +AllowShortLoopsOnASingleLine: 'false' +BreakBeforeBraces: Allman +ColumnLimit: '120' +IndentWidth: '4' +PointerAlignment: Right +SortIncludes: 'false' + diff --git a/dotfiles/bash/scripts/cgen_etc/gitignore_template b/dotfiles/bash/scripts/cgen_etc/gitignore_template new file mode 100644 index 0000000..300d9c4 --- /dev/null +++ b/dotfiles/bash/scripts/cgen_etc/gitignore_template @@ -0,0 +1,97 @@ +# Prerequisites +*.d + +# Object files +*.o +*.ko +*.obj +*.elf + +# Linker output +*.ilk +*.map +*.exp + +# Precompiled Headers +*.gch +*.pch + +# Libraries +*.lib +*.a +*.la +*.lo + +# Shared objects (inc. Windows DLLs) +*.dll +*.so +*.so.* +*.dylib + +# Executables +*.exe +*.out +*.app +*.i*86 +*.x86_64 +*.hex + +# Debug files +*.dSYM/ +*.su +*.idb +*.pdb + +# Kernel Module Compile Results +*.mod* +*.cmd +.tmp_versions/ +modules.order +Module.symvers +Mkfile.old +dkms.conf + +# VSCode + +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Vim + +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +# CMake + +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps