Files
neovim/runtime/indent
zeertzjq 721569dd9b vim-patch:9.2.0788: filetype: hip files are not recognized (#40809)
Problem:  filetype: hip files are not recognized
Solution: Detect *.hip files as hip filetype, include filetype, syntax
          and indent plugins, update makemenu.vim and synmenu.vim (Young)

Round out HIP (Heterogeneous-compute Interface for Portability) support
to mirror the existing CUDA files:

- autoload/dist/ft.vim: detect the ".hip" extension as filetype "hip"
- ftplugin/hip.vim: behave like C++ by sourcing ftplugin/cpp.vim
- indent/hip.vim: use cindent, like indent/cuda.vim
- makemenu.vim / synmenu.vim: add a Syntax menu entry

The syntax/hip.vim file already sources syntax/cpp.vim and adds the
HIP-specific keywords, matching syntax/cuda.vim.

closes: vim/vim#20773

b3ad239038

Co-authored-by: Young <young20050727@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 22:19:48 +08:00
..
2023-08-13 13:25:10 +01:00
2014-07-29 02:12:31 +00:00
2024-05-20 14:43:12 +02:00
2024-04-22 00:18:34 +02:00
2017-11-06 05:26:16 +01:00
2023-08-23 20:36:16 +01:00
2014-07-29 02:12:31 +00:00
2022-07-26 11:26:23 +02:00
2022-03-20 10:48:10 +01:00
2023-08-13 13:25:10 +01:00
2023-12-15 10:30:13 +01:00
2021-10-05 14:12:16 +02:00
2017-04-29 01:47:36 +02:00
2023-08-13 13:25:10 +01:00
2022-06-10 08:40:32 +02:00
2021-10-05 14:12:16 +02:00
2023-08-13 13:25:10 +01:00
2022-04-08 19:53:41 +02:00
2017-11-06 05:26:16 +01:00
2022-06-17 20:38:21 +02:00
2023-08-29 11:32:46 +02:00
2017-11-06 05:35:32 +01:00
2021-10-05 14:12:16 +02:00
2023-10-16 16:36:25 +08:00
2021-10-05 14:12:16 +02:00
2022-07-26 11:26:23 +02:00
2023-08-29 11:32:46 +02:00
2023-12-23 12:41:10 +01:00
2024-01-17 14:47:40 +00:00
2017-11-07 01:37:30 +01:00
2023-08-29 11:32:46 +02:00
2022-03-20 10:48:10 +01:00
2021-10-16 18:03:51 +02:00
2017-11-07 01:37:30 +01:00
2023-08-23 20:36:16 +01:00
2017-11-07 01:37:30 +01:00
2022-07-30 15:48:32 +02:00
2024-03-26 21:48:41 +01:00
2023-08-29 11:32:46 +02:00
2014-07-29 02:12:31 +00:00
2023-09-17 22:52:56 +02:00
2023-10-16 16:36:25 +08:00
2021-10-05 14:12:16 +02:00
2015-10-11 18:07:58 -04:00
2022-03-20 10:48:10 +01:00
2023-04-23 15:22:55 +02:00
2023-08-29 11:32:46 +02:00
2023-08-23 20:36:16 +01:00
2021-10-05 14:12:16 +02:00
2017-04-28 23:49:16 +02:00
2017-04-29 01:01:51 +02:00
2023-08-24 11:33:06 +09:00
2024-01-16 23:08:41 +00:00
2021-10-05 14:12:16 +02:00
2021-05-02 12:03:34 -04:00
2023-08-13 13:25:10 +01:00
2024-01-24 11:05:25 +01:00
2024-11-21 06:50:30 +08:00
2024-02-21 06:30:18 +08:00
2019-07-29 20:50:07 +02:00
2023-10-16 16:36:25 +08:00
2021-10-05 14:12:16 +02:00
2024-02-21 06:30:18 +08:00
2024-02-21 06:30:18 +08:00
2024-02-21 06:30:18 +08:00
2024-02-21 06:30:18 +08:00
2023-12-29 00:54:09 +01:00
2023-08-29 11:32:46 +02:00
2023-08-24 11:33:06 +09:00
2014-07-29 02:12:31 +00:00
2021-10-16 18:03:51 +02:00
2021-04-28 21:29:57 -04:00
2021-10-05 14:12:16 +02:00
2021-10-16 18:03:51 +02:00
2023-08-29 11:32:46 +02:00
2022-04-27 17:48:35 +02:00
2022-04-27 17:48:35 +02:00
2022-04-27 17:48:35 +02:00
2023-01-01 15:00:39 +01:00
2023-08-29 11:32:46 +02:00
2023-08-13 13:25:10 +01:00
2014-12-30 13:51:39 +01:00
2022-04-27 17:48:35 +02:00
2023-08-13 13:25:10 +01:00
2022-04-27 17:48:35 +02:00
2014-07-29 02:12:31 +00:00
2022-04-27 17:48:35 +02:00
2023-08-13 13:25:10 +01:00
2015-11-08 03:39:07 +01:00

This directory contains files to automatically compute the indent for a
type of file.

If you want to add your own indent file for your personal use, read the docs
at ":help indent-expression".  Looking at the existing files should give you
inspiration.

If you make a new indent file which would be useful for others, please send it
to the vim-dev mailing list <vim-dev@vim.org>.  Include instructions for
detecting the file type for this language, by file name extension or by
checking a few lines in the file. And please stick to the rules below.

If you have remarks about an existing file, send them to the maintainer of
that file.  Only when you get no response send a message to the vim-dev
mailing list: <vim-dev@vim.org>.

If you are the maintainer of an indent file and make improvements, e-mail the
new version to the vim-dev mailing list: <vim-dev@vim.org>.


Rules for making an indent file:

You should use this check for "b:did_indent":

	" Only load this indent file when no other was loaded yet.
	if exists("b:did_indent")
	  finish
	endif
	let b:did_indent = 1

Always use ":setlocal" to set 'indentexpr'.  This avoids it being carried over
to other buffers.

To trigger the indenting after typing a word like "endif", add the word to the
'indentkeys' option with "+=".

You normally set 'indentexpr' to evaluate a function and then define that
function.  That function only needs to be defined once for as long as Vim is
running.  Add a test if the function exists and use ":finish", like this:
	if exists("*GetMyIndent")
	  finish
	endif

The user may have several options set unlike you, try to write the file such
that it works with any option settings.  Also be aware of certain features not
being compiled in.