Recognize HIP files as C++#57333
Conversation
There was a problem hiding this comment.
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
hipto the C++path_suffixeslist so.hipfiles map to the C++ grammar.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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. |
|
@zed-industries/approved |
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++
Self-Review Checklist:
Closes #ISSUE
Release Notes: