.ISPC files arent rendered as c++, unlike cuda files
What version of Codex CLI is running?
latest - not relavant
What subscription do you have?
plus - irrelevant
Which model were you using?
_No response_
What platform is your computer?
_No response_
What terminal emulator and version are you using (if applicable)?
_No response_
Codex doctor report
see ISPC files have a .ispc extension for source, and a .isph extension for headers.
What issue are you seeing?
<img width="1637" height="1080" alt="Image" src="https://github.com/user-attachments/assets/617d0f86-f571-42e2-86d2-eaa9b4300ce0" />
<img width="1775" height="853" alt="Image" src="https://github.com/user-attachments/assets/72ca25f4-51e9-48b9-8541-bcc4287736cb" />
<img width="731" height="85" alt="Image" src="https://github.com/user-attachments/assets/8de49641-6582-4a4d-bae8-f51299e0a4b7" />
would like to mention https://github.com/openai/codex/commit/726689564aa7ab938f40bfd94479d5b66c48c91b
by @etraut-openai which "Map .cu and .cuh extensions to the C++ syntax definition so CUDA source"
same should happen to popular relevant other type of compilers too as it follow mostly basic c++ syntax
also Yes, GitHub natively renders .ispc files
for example https://github.com/ispc/ispc/blob/main/examples/cpu/volume_rendering/volume.ispc
so its a common format
What steps can reproduce the bug?
prompt the codex with interesting things you have no clue about like compilers, or .ispc
What is the expected behavior?
_No response_
Additional information
_No response_
6 Comments
I traced this through the current TUI highlighting path.
diff_render.rsalready extracts the file extension and passes it through the existing syntax-highlighting path, so this does not appear to require any diff-rendering changes.The missing piece is
find_syntaxincodex-rs/tui/src/render/highlight.rs.two-facedoes not resolveispc/isph, while Codex already has a small fallback alias table there for unsupported C++-like extensions such ascu/cuhandcppm/cxxm/ixx.The minimal change appears to be:
ispc | isphtocppinfind_syntaxfind_syntax_resolves_languages_and_aliasescpp_module_extensions_use_cpp_highlightingrendered-diff test and itsinstasnapshotThis keeps the existing unknown-extension fallback unchanged and follows the same implementation/testing pattern as the CUDA change in #34570.
Happy to submit the focused patch if this matches the intended direction and you'd like an external PR.
Its a small enhancement - the use ispc or isph is rare. but is a legitmate format as its one of the bigger compilers
sounds good, i’ll put together the focused patch.
For anyone picking this up: it's a one-line change in the same alias table the CUDA commit touched.
find_syntaxpatches extensions two-face can't resolve (https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/tui/src/render/highlight.rs#L541-L550), so ISPC just needs"ispc" | "isph" => "cpp",next to the existing"cu" | "cuh" => "cpp",line. Other C-family candidates with no dedicated syntect definition (.metal,.cl/OpenCL,.hip) could join the same arm; anything two-face already knows should be left out so it keeps its proper grammar.yeah its a bit painful compiling a huge codebase like Codex - but still - provided another commit by @etraut-openai , on how the codex repo likely want for the maintainers for quicker patch
as for using cargo and fetching all of the whatever seems a bit painful too
fairpoint .cl .hip .metal should be supported?
ispc? is pretty much c
maybe its fair that @ttaylorr-oai would push this commit?
<img width="887" height="462" alt="Image" src="https://github.com/user-attachments/assets/0659abcc-3a3f-45d2-8eaa-733aa60e35b8" />