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

Recognize .C and .H file types as cpp #5808

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

budde25
Copy link
Contributor

@budde25 budde25 commented Feb 3, 2023

.C, and .H and two more valid cpp source and header types. Note the capitalization, as opposed two .c, and .h for c files.
I also found a source that mentions the extensions multiple different compilers support https://stackoverflow.com/a/3223792

Copy link
Member

@sudormrfbin sudormrfbin left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@archseer
Copy link
Member

archseer commented Feb 3, 2023

Hmm isn't file type detection case insensitive? I think it used to be

@pascalkuthe
Copy link
Member

pascalkuthe commented Feb 3, 2023

It doesn't appear to be. It's just a hashmap lookup (language_config_ids_by_extension, ...) and there is no case conversion before hashmap lookup or insert. That might actually cause problems on case insensitive FS (windows)

@the-mikedavis the-mikedavis changed the title Add support for two more common cpp source and header file types Recognize .C and .H file types as cpp Feb 5, 2023
@the-mikedavis the-mikedavis merged commit 9c98043 into helix-editor:master Feb 5, 2023
@budde25 budde25 deleted the cpp-detection-fix branch February 6, 2023 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants