Browse Source

Minor fix to auto-indentation.

merge-requests/365/head
eidheim 10 years ago
parent
commit
e41b5bce86
  1. 2
      src/files.h
  2. 4
      src/source_clang.cc

2
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\": \"<primary>n\",\n"

4
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+="}\"";

Loading…
Cancel
Save