Skip to content

Support C++ header file extensions (.hpp, .hh, .hxx, .h++) in LSP language detection #12660

Closed

Description

@Huijiro

Problem

C++ projects commonly use header file extensions like .hpp, .hh, .hxx, and .h++ in addition to the standard .h extension. These are already supported by the clangd LSP server and clang-format formatter, but they're not currently mapped in the LSP language detection system.

Solution

Map these additional C++ header file extensions to the cpp language type in LANGUAGE_EXTENSIONS so they receive proper syntax highlighting and LSP support.

Activity

  1. github-actions commented on Feb 8, 2026

    @github-actions
    Contributor

    This issue is related to several existing issues around C++ and LSP support:

    While these aren't exact duplicates, they represent related challenges in improving C++ language support and file extension detection in OpenCode. You may find context useful when implementing this feature.

  2. github-actions commented on Apr 10, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions