diff --git a/autoload/codefmt.vim b/autoload/codefmt.vim index 1cd9bca..c5c13cd 100644 --- a/autoload/codefmt.vim +++ b/autoload/codefmt.vim @@ -237,12 +237,6 @@ function! codefmt#GetClangFormatFormatter() abort let l:cmd += ['-cursor', string(l:cursor_pos)] endif - " Version 3.8 added support for the -sort-includes option. - " http://llvm.org/viewvc/llvm-project?view=revision&revision=248367 - if s:ClangFormatHasAtLeastVersion([3, 8]) - let l:cmd += ['-sort-includes'] - endif - let l:input = join(getline(1, line('$')), "\n") let l:result = maktaba#syscall#Create(l:cmd).WithStdin(l:input).Call() let l:formatted = split(l:result.stdout, "\n") diff --git a/vroom/clangformat.vroom b/vroom/clangformat.vroom index 36de5b1..05c67bd 100644 --- a/vroom/clangformat.vroom +++ b/vroom/clangformat.vroom @@ -180,60 +180,6 @@ that clang-format has a version >= 3.4). -For clang-format versions 3.8 and above, it will sort #include lines (using the --sort-includes option). - - :Glaive codefmt clang_format_executable='clang-format-3.7' - @clear - % #include - |#include - |int f() { int i = 1; return 1234567890; } - - :FormatCode clang-format - ! clang-format-3.7 --version .* - $ clang-format version 3.7.0 (tags/testing) - ! clang-format-3.7 -style file -lines 1:3 -cursor \d+ 2>.* - $ { "Cursor": 0 } - $ #include - $ #include - $ int f() { - $ int i = 1; - $ return 1234567890; - $ } - #include - #include - int f() { - int i = 1; - return 1234567890; - } - @end - :Glaive codefmt clang_format_executable='clang-format' - @clear - % #include - |#include - |int f() { int i = 1; return 1234567890; } - - :FormatCode clang-format - ! clang-format --version .* - $ clang-format version 3.8.0 (tags/testing) - ! clang-format -style file .* -sort-includes .*2>.* - $ { "Cursor": 0 } - $ #include - $ #include - $ int f() { - $ int i = 1; - $ return 1234567890; - $ } - #include - #include - int f() { - int i = 1; - return 1234567890; - } - @end - - - You might have wondered where the "-style file" above comes from. The clang-format tool accepts a "style" option to control the formatting style. By default, "file" is used to indicate that clang-format should respect