Skip to content

Conversation

bobbrow
Copy link
Member

@bobbrow bobbrow commented Oct 15, 2025

Fixes: #4077

This change disables C_Cpp.autoAddFilesAssociations by default and lists the standard headers in package.json to associate them with C++. Other extensionless headers will not get special treatment, but their languageId will still be fixed when a goto definition command is handled.

@bobbrow bobbrow requested a review from a team as a code owner October 15, 2025 16:50
@github-project-automation github-project-automation bot moved this to Pull Request in cpptools Oct 15, 2025
Copy link
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add the missing extensionless system headers?

ccomplex
cfenv
cinttypes
contracts
cstdalign
cstdbool
cstdint
ctgmath
cuchar
debugging
hazard_pointer
hive
inplace_vector
linalg
rcu
simd
text_encoding

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Oct 15, 2025

Is this for 1.28.3? Or 1.29.0? Seems like 1.29.0 might be better...I was worried about something breaking regarding the language handling.

@sean-mcmanus
Copy link
Contributor

Does this change potentially break something contributed by VS Code itself and/or should the change be made in VS Code itself?

@sean-mcmanus
Copy link
Contributor

What about the other "languages" fields like "aliases" and "configuration" -- should those be set? Does VS Code set those and/or do we inherit those if we don't set the fields?

@bobbrow
Copy link
Member Author

bobbrow commented Oct 15, 2025

Can you add the missing extensionless system headers?

Yes. It looks like I did not include headers removed since their introduction and new C++26 headers.

@sean-mcmanus
Copy link
Contributor

VS Code uses

        "aliases": [
          "C++",
          "Cpp",
          "cpp"
        ],
        "configuration": "./language-configuration.json"

Do you know how to check if that is still inherited?

Copy link
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add the GSL library extensionless files? VS has those added (maybe others?).

Copy link
Contributor

@sean-mcmanus sean-mcmanus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we generate/update this list of filenames by reading a shared file with VS which also has a similar list of extension less files? We could do that similar to the import-edge-strings script.

Or otherwise, should it manually match VS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

Switch to using setTextDocumentLanguage instead of adding to files.associations

2 participants