Vscode-cpptools: C_Cpp.clang_format_sortIncludes dosn't work

Created on 12 Jun 2019  路  2Comments  路  Source: microsoft/vscode-cpptools

Type: LanguageService

Describe the bug

  • OS and Version: Windows7x64
  • VS Code Version: 1.35.0
  • C/C++ Extension Version: 0.23.1
  • Other extensions you installed (and if the issue persists after disabling them):
    C/C++ Clang Command Adapter, Code Runner, Noctis
  • A clear and concise description of what the bug is.
    I set "C_Cpp.clang_format_sortIncludes" to false ,but when i press alt+shift+f in my opengl program, my includes will be resorted .
    My Original includes :
    `

include

include

After format by press alt+shift+f :

include

include

`

To Reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

Screenshots

Additional context

Code Formatting Language Service question

All 2 comments

Capital 'F' comes before lower-case 'a'. This could be a clang-format issue. The sorting may be case-sensitive. What happens if you use lower-case letters for GLFW?

Capital 'F' comes before lower-case 'a'. This could be a clang-format issue. The sorting may be case-sensitive. What happens if you use lower-case letters for GLFW?

That works ! when i use "glfw/glfw3.h", resorting do not happen again ! Thanks a lot !

Was this page helpful?
0 / 5 - 0 ratings