.ISPC files arent rendered as c++, unlike cuda files

Open 💬 6 comments Opened Aug 14, 2026 by glook9001

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_

View original on GitHub ↗

6 Comments

lakshayxi · 13 days ago

I traced this through the current TUI highlighting path.

diff_render.rs already 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_syntax in codex-rs/tui/src/render/highlight.rs. two-face does not resolve ispc/isph, while Codex already has a small fallback alias table there for unsupported C++-like extensions such as cu/cuh and cppm/cxxm/ixx.

The minimal change appears to be:

  • map ispc | isph to cpp in find_syntax
  • extend find_syntax_resolves_languages_and_aliases
  • extend the existing cpp_module_extensions_use_cpp_highlighting rendered-diff test and its insta snapshot

This 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.

glook9001 · 12 days ago
I traced this through the current TUI highlighting path. diff_render.rs already 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_syntax in codex-rs/tui/src/render/highlight.rs. two-face does not resolve ispc/isph, while Codex already has a small fallback alias table there for unsupported C++-like extensions such as cu/cuh and cppm/cxxm/ixx. The minimal change appears to be: map ispc | isph to cpp in find_syntax extend find_syntax_resolves_languages_and_aliases * extend the existing cpp_module_extensions_use_cpp_highlighting rendered-diff test and its insta snapshot This 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

lakshayxi · 12 days ago

sounds good, i’ll put together the focused patch.

jdcodes1 · 9 days ago

For anyone picking this up: it's a one-line change in the same alias table the CUDA commit touched. find_syntax patches 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.

glook9001 · 9 days ago
For anyone picking this up: it's a one-line change in the same alias table the CUDA commit touched. find_syntax patches 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?

glook9001 · 9 days ago

<img width="887" height="462" alt="Image" src="https://github.com/user-attachments/assets/0659abcc-3a3f-45d2-8eaa-733aa60e35b8" />