Skip to content

Recognize HIP files as C++#57333

Merged
osiewicz merged 12 commits into
zed-industries:mainfrom
Young-TW:main
May 26, 2026
Merged

Recognize HIP files as C++#57333
osiewicz merged 12 commits into
zed-industries:mainfrom
Young-TW:main

Conversation

@Young-TW

Copy link
Copy Markdown
Contributor

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments (I am not adding new unsafe blocks)
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior (Should I add a test for this?)
  • Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

  • Added Recognizing HIP files as C++

Copilot AI review requested due to automatic review settings May 21, 2026 03:05
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 21, 2026
@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label May 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the built-in C++ language configuration so that HIP source files (.hip) are recognized and handled as C++ within Zed’s grammar/language system.

Changes:

  • Add hip to the C++ path_suffixes list so .hip files map to the C++ grammar.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@maxdeviant maxdeviant changed the title feat: Recognize HIP files as C++ Recognize HIP files as C++ May 21, 2026
@Young-TW

Copy link
Copy Markdown
Contributor Author

For some context on what HIP is:

HIP (Heterogeneous-compute Interface for Portability) is a C++ dialect and runtime API created by AMD for high-performance GPU computing. It is essentially AMD's open-source equivalent to NVIDIA's CUDA.

Because HIP code is fundamentally just standard C++ with a few specific extensions for GPU kernel execution, treating .hip files as C++ is the standard approach across most IDEs and editors to provide syntax highlighting and language server support.

@MrSubidubi MrSubidubi requested a review from osiewicz May 21, 2026 07:12
@MrSubidubi MrSubidubi added the area:languages/c++ C++ programming language support label May 21, 2026
@osiewicz osiewicz added this pull request to the merge queue May 26, 2026
Merged via the queue into zed-industries:main with commit 533d3d5 May 26, 2026
32 checks passed
@zed-zippy zed-zippy Bot added the PR state:needs review Used to label PRs that are in need of a post-merge approval label May 26, 2026
@bennetbo

Copy link
Copy Markdown
Member

@zed-industries/approved

@zed-zippy zed-zippy Bot removed the PR state:needs review Used to label PRs that are in need of a post-merge approval label May 27, 2026
TomPlanche pushed a commit to TomPlanche/zed that referenced this pull request Jun 2, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments (I am not adding
new unsafe blocks)
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior (Should I add a test for
this?)
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- Added Recognizing HIP files as C++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:languages/c++ C++ programming language support cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants