Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#include completion should sort files starting with underscores last #3465

Closed
philong6297 opened this issue Apr 14, 2019 · 4 comments
Closed
Assignees
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Milestone

Comments

@philong6297
Copy link

  • OS and Version: Windows 10 Enterprise LTSC Redstone 5
  • VS Code Version: 1.33.1
  • C/C++ Extension Version: 0.22.1
  • Other extensions you installed (and if the issue persists after disabling them):
    • CMake Extension: 0.0.17
    • CMake Tools Extension: 1.1.3
    • MinGW kit : x86-64 8.1.0
    • CMake: 3.14.1

I want to make the intellisense only provide suggestion for only STL header files (iostream, type_traits, ...), not show any other files in the compiler kit. Let me use some screenshots to explain my desire:

  • I didn't include type_traits, but still have suggestion for this. What i want is it will only show suggestion depend on the include:
    image
  • The GL folder and the other files start with __... is implement files MinGW, i dont want to browse for these files in #include. What i want is whenever i use #include it will only show STL headers and files in my folder root:
    image
  • My MinGW STL library is in C:/Program Files/mingw-w64/x86_64-8.1.0-win32-seh-rt_v6-rev0/mingw64/lib/gcc/x86_64-w64-mingw32/8.1.0/include/c++, so i include it in both includePath and browse.path in configuration:
    image
  • In workspace settings file, i exclude entire mingw folder, i expected it will exclude "the other files" that i described above but it didn't work:
    image
@sean-mcmanus
Copy link
Collaborator

"/mingw64/" is a file-based exclusion. Can you change it to a folder-based exclusion of "**/mingw64" or change the C_Cpp.exclusionPolicy setting?

@philong6297
Copy link
Author

I tried both way as you said but it didn't work

@sean-mcmanus sean-mcmanus added investigate: repro This issue's repro steps needs to be investigated/confirmed Language Service labels May 3, 2019
@bobbrow
Copy link
Member

bobbrow commented Apr 9, 2020

Coming back to this issue:

  1. type_traits is included by iostream and we don't have a way to selectively exclude symbols from included headers.
  2. auto-complete usually sorts symbols starting with _ to the end of the list. It looks like we aren't doing this for headers. (bug)
  3. You shouldn't need to add system include paths to includePath and browse.path in your configuration. We query the compiler in compilerPath to fill these in automatically.
  4. The exclude glob patterns don't apply outside of the ${workspaceFolder}. I don't think there's a way to achieve this.

@bobbrow bobbrow changed the title exclude path from intellisense to only show suggestion for STL library #include completion should sort files starting with underscores last Apr 9, 2020
@bobbrow bobbrow added bug and removed investigate: repro This issue's repro steps needs to be investigated/confirmed labels Apr 9, 2020
@bobbrow bobbrow added this to the Backlog milestone Apr 9, 2020
@Colengms Colengms modified the milestones: Backlog, 1.2.0 Dec 4, 2020
@Colengms Colengms self-assigned this Dec 4, 2020
@Colengms Colengms added the fixed Check the Milestone for the release in which the fix is or will be available. label Dec 8, 2020
@sean-mcmanus
Copy link
Collaborator

@bobbrow bobbrow added fixed Check the Milestone for the release in which the fix is or will be available. and removed fixed Check the Milestone for the release in which the fix is or will be available. labels Jan 26, 2021
@Colengms Colengms closed this as completed Feb 3, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix
Projects
None yet
Development

No branches or pull requests

4 participants