Files
neovim/runtime/indent
zeertzjq aa9ab2e728 vim-patch:99ea2b5: runtime(handlebars): adds handlebars template syntax & indent support
The runtime had support to detect handlebars (*.hbs) files as filetype
handlebars but was lacking any indent or syntax highlighting for that
filetype.

The handlebars syntax file is also a prerequisite for the glimmer
syntax.

Permission was granted by the original author to retrofit these into the
Vim runtime. Original License (MIT) maintained in code comments.

related: vim/vim#19569

99ea2b5b06

Co-authored-by: Devin Weaver <suki@tritarget.org>
2026-03-06 07:59:15 +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-10-16 16:36:25 +08: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-05-15 09:38:32 +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-11-25 17:33:05 +01: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
2022-12-08 16:33:38 +01: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.