Skip to content

fix(tui): highlight C++ module interface files - #53852

Merged
rekram1-node merged 1 commit into
devfrom
cppm-filetype-dev
Oct 9, 2026
Merged

rekram1-node merged 1 commit into
devfrom
cppm-filetype-dev

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #53743

Type of change

  • Bug fix

What does this PR do?

The TUI picks a Tree-sitter grammar from LANGUAGE_EXTENSIONS in packages/tui/src/util/filetype.ts. That map had no entries for C++ module interface units, so .cppm (and the other common module interface extensions) returned no filetype and rendered without highlighting in edit, diff, and permission views.

This adds .cppm, .ccm, .cxxm, .c++m (Clang/GCC conventions) and .ixx (MSVC) to the existing cpp filetype.

LSP attachment for these files is unchanged: clangd's extension list in packages/opencode/src/lsp/server.ts does not include them, so that is out of scope here.

How did you verify your code works?

Checked that every added extension resolves to the existing cpp filetype, which already has a registered Tree-sitter parser. Existing filetype tests and bun run typecheck in packages/tui pass.

Requested by: @rekram1-node (Aiden Cline via Slack)

@rekram1-node
rekram1-node merged commit 055d95b into dev Oct 9, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the cppm-filetype-dev branch October 9, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TUI does not recognize .cppm files as C++

1 participant