[vim/vim] runtime(hip): add filetype detection, ftplugin, indent and syntax menu (PR #20773)

2 views
Skip to first unread message

Young

unread,
5:37 AM (3 hours ago) 5:37 AM
to vim/vim, Subscribed

This rounds out HIP (Heterogeneous-compute Interface for Portability) support so
it mirrors the existing CUDA runtime files. syntax/hip.vim already existed
(sourcing syntax/cpp.vim plus HIP-specific keywords, like syntax/cuda.vim),
but the surrounding pieces were missing.

Changes, each mirroring its CUDA counterpart:

  • autoload/dist/ft.vim: detect the .hip extension as filetype hip
    (next to the existing .cu/.cuhcuda entries).
  • ftplugin/hip.vim (new): behaves like C++ by sourcing ftplugin/cpp.vim,
    mirroring ftplugin/cuda.vim.
  • indent/hip.vim (new): uses cindent, mirroring indent/cuda.vim.
  • makemenu.vim / synmenu.vim: add a Syntax menu entry under HIJK.HIP.

The synmenu.vim change is a minimal single-line insert rather than a full
regeneration, to keep the diff limited to HIP. (A make menu regeneration also
renumbers an unrelated pre-existing duplicate priority in the C section.)

Verified with a locally built Vim on a real .hip file: filetype resolves to
hip, cindent is set, the C++ ftplugin chain applies (e.g. commentstring),
and HIP keywords highlight correctly (__global__ → StorageClass,
hipError_t/dim3 → Type, hipSuccess → Constant).

🤖 Generated with Claude Code


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/20773

Commit Summary

  • a527eec runtime(hip): add filetype detection, ftplugin, indent and syntax menu

File Changes

(6 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/20773@github.com>

Reply all
Reply to author
Forward
0 new messages