diff --git a/src/files.h b/src/files.h index 6a7947e..ba80cb1 100644 --- a/src/files.h +++ b/src/files.h @@ -49,7 +49,7 @@ const std::string configjson = " \"702\": \"def:statement\",\n" " \"705\": \"def:comment\"\n" " },\n" -" \"clang_format_style\": \"ColumnLimit: 0\" //IndentWidth and UseTab is set automatically. See http://clang.llvm.org/docs/ClangFormatStyleOptions.html\n" +" \"clang_format_style\": \"ColumnLimit: 0\" //IndentWidth, AccessModifierOffset and UseTab are set automatically. See http://clang.llvm.org/docs/ClangFormatStyleOptions.html\n" " },\n" " \"keybindings\": {\n" " \"new_file\": \"n\",\n" diff --git a/src/source_clang.cc b/src/source_clang.cc index 06b9532..cba2025 100644 --- a/src/source_clang.cc +++ b/src/source_clang.cc @@ -937,8 +937,8 @@ Source::ClangViewAutocomplete(file_path, project_path, language) { tab_style="UseTab: Never"; } command+=" -style=\"{IndentWidth: "+std::to_string(indent_width); - if(tab_style.size()>0) - command+=", "+tab_style; + command+=", "+tab_style; + command+=", "+std::string("AccessModifierOffset: -")+std::to_string(indent_width); if(Singleton::Config::source()->clang_format_style!="") command+=", "+Singleton::Config::source()->clang_format_style; command+="}\"";