neovim/runtime/indent
Christian Clason adcd9360df vim-patch:4ce1cb5: runtime(graphql): contribute vim-graphql to Vim core
Contribute the core of my vim-graphql project (ftplugin, indent, syntax)
to the Vim project. This replaces the basic ftplugin support that was
already in the runtime with a more complete set of filetype settings. I
can assume maintainership for all of these files.

I'll continue to maintain the higher-level embedded filetype support
separately (in vim-graphql) for now, because it's fairly complex, but we
can consider integrating that code directly into vim later.

runtime files use the MIT license.

closes: vim/vim#16273

4ce1cb5bf1

Co-authored-by: Jon Parise <jon@indelible.org>
2024-12-23 11:34:23 +01:00
..
testdir vim-patch:0acd3ab: runtime(sh): better function support for bash/zsh in indent script 2024-11-15 09:32:15 +01:00
aap.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
ada.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
ant.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
arduino.vim vim-patch:957d903cb7af 2024-05-20 14:43:12 +02:00
astro.vim vim-patch:d3ff129ce8c6 2024-04-22 00:18:34 +02:00
automake.vim vim-patch:214641f77df6 2017-11-06 05:26:16 +01:00
awk.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
bash.vim vim-patch:e8d6f03f6a61 2023-08-23 20:36:16 +01:00
basic.vim vim-patch:partial:f10911e5db16 (#17248) 2022-01-31 15:27:01 +01:00
bib.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
bitbake.vim vim-patch:b529cfbd04c0 (#19501) 2022-07-26 11:26:23 +02:00
bst.vim vim-patch:47c532e2bc55 (#17780) 2022-03-20 10:48:10 +01:00
bzl.vim vim-patch:partial 53f7fccc9413 (#15631) 2021-09-11 16:47:45 +02:00
c.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
cdl.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
ch.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
chaiscript.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
changelog.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
chatito.vim vim-patch:9fbdbb814f4a (#20376) 2022-09-28 12:48:36 +02:00
clojure.vim vim-patch:46eea444d (#17920) 2022-03-30 12:12:12 +01:00
cmake.vim vim-patch:3afc9f2556fa 2023-12-15 10:30:13 +01:00
cobol.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
config.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
context.vim vim-patch:46fceaaa8d14 2017-04-29 01:47:36 +02:00
cpp.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
cs.vim vim-patch:partial:63f32603789d (#18916) 2022-06-10 08:40:32 +02:00
css.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
cucumber.vim vim-patch:715a8058895f 2023-12-29 00:54:09 +01:00
cuda.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
d.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
dictconf.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
dictdconf.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
docbk.vim vim-patch:214641f77df6 2017-11-06 05:26:16 +01:00
dosbatch.vim vim-patch:partial 079ba76ae7a7 (#16126) 2021-10-23 22:29:17 +02:00
dtd.vim vim-patch:d592deb33652 (#19002) 2022-06-17 20:38:21 +02:00
dtrace.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
dts.vim vim-patch:b7398fe41c9e (#23627) 2023-05-15 09:38:32 +02:00
dune.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
dylan.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
eiffel.vim vim-patch:036986f1507d 2017-11-06 05:35:32 +01:00
elm.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
erlang.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
eruby.vim vim-patch:d09091d4955c 2019-07-29 20:50:07 +02:00
eterm.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
expect.vim vim-patch:b529cfbd04c0 (#19501) 2022-07-26 11:26:23 +02:00
falcon.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
fennel.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
fish.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
fortran.vim vim-patch:ea9964a36f94 2023-12-23 12:41:10 +01:00
framescript.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
freebasic.vim vim-patch:partial:f10911e5db16 (#17248) 2022-01-31 15:27:01 +01:00
gdscript.vim vim-patch:9b03d3e75b42 (#27059) 2024-01-17 14:47:40 +00:00
gitconfig.vim vim-patch:3ec574f2b549 2017-11-07 01:37:30 +01:00
gitolite.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
glsl.vim vim-patch:9.1.0610: filetype: OpenGL Shading Language files are not detected (#29831) 2024-07-23 06:28:05 +08:00
go.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
graphql.vim vim-patch:4ce1cb5: runtime(graphql): contribute vim-graphql to Vim core 2024-12-23 11:34:23 +01:00
gyp.vim vim-patch:9fbdbb814f4a (#20376) 2022-09-28 12:48:36 +02:00
haml.vim vim-patch:47c532e2bc55 (#17780) 2022-03-20 10:48:10 +01:00
hamster.vim vim-patch:2286304cdbba 2021-10-16 18:03:51 +02:00
hare.vim vim-patch:9.1.0442: hare runtime files outdated (#29011) 2024-05-26 07:11:50 +08:00
hcl.vim vim-patch:150b507: runtime(hcl,terraform): Add runtime files for HCL and Terraform (#30266) 2024-09-04 19:32:52 -05:00
hog.vim vim-patch:3ec574f2b549 2017-11-07 01:37:30 +01:00
html.vim vim-patch:e8d6f03f6a61 2023-08-23 20:36:16 +01:00
htmldjango.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
idlang.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
idris2.vim vim-patch:5ca8f22: runtime(idris2): include filetype,indent+syntax plugins for (L)Idris2 + ipkg 2024-11-13 08:24:14 +01:00
ishd.vim vim-patch:3ec574f2b549 2017-11-07 01:37:30 +01:00
j.vim vim-patch:09c6f265b210 2021-04-27 09:21:30 -04:00
java.vim vim-patch:036986f1507d 2017-11-06 05:35:32 +01:00
javascript.vim vim-patch:2ecbe53f452e (#19577) 2022-07-30 15:48:32 +02:00
javascriptreact.vim vim-patch:8.1.1937: errors when using javascriptreact #10885 2019-08-30 06:57:44 +02:00
json5.vim vim-patch:63833bb0217f 2024-03-26 21:48:41 +01:00
json.vim vim-patch:71b6d3397649 (#20144) 2022-09-10 14:54:13 +02:00
jsonc.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
jsp.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
julia.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
kdl.vim vim-patch:79da22d: runtime(kdl): fix KdlIndent and kdlComment in indent script (vim/vim#15019) 2024-06-16 12:00:58 +02:00
kotlin.vim vim-patch:e30d8e4ce01d 2023-09-17 22:52:56 +02:00
krl.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
ld.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
less.vim vim-patch:8feef4f #3444 2015-10-11 18:07:58 -04:00
lifelines.vim vim-patch:6c391a74fe90 (#15654) 2021-09-13 16:33:41 +02:00
liquid.vim vim-patch:47c532e2bc55 (#17780) 2022-03-20 10:48:10 +01:00
lisp.vim vim-patch:partial: 48c3f4e0bff7 (#19684) 2022-08-09 10:43:28 +02:00
livebook.vim vim-patch:71badf9547e8 (#23285) 2023-04-23 15:22:55 +02:00
logtalk.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
lua.vim vim-patch:c0f7505: runtime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr 2024-08-04 19:00:10 +02:00
luau.vim vim-patch:b7398fe41c9e (#23627) 2023-05-15 09:38:32 +02:00
mail.vim vim-patch:e8d6f03f6a61 2023-08-23 20:36:16 +01:00
make.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
Makefile vim-patch:7ff78465f705 2021-04-28 23:04:14 -04:00
matlab.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
meson.vim vim-patch:partial 113cb513f76d (#16260) 2021-11-08 00:10:44 +01:00
mf.vim vim-patch:2ec618c9feac 2017-04-28 23:49:16 +02:00
mma.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
mojo.vim vim-patch:fc533c9: runtime(mojo): include mojo ftplugin and indent script 2024-07-12 11:34:11 +02:00
mp.vim vim-patch:dc08328821a2 2017-04-29 01:01:51 +02:00
nginx.vim vim-patch:partial:f1dcd14fc5d4 (#21602) 2023-01-01 15:00:39 +01:00
nsis.vim vim-patch:3fc7a7e44abd 2023-08-24 11:33:06 +09:00
objc.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
obse.vim vim-patch:partial:b59ae59a5870 (#21170) 2022-11-24 10:23:50 +00:00
ocaml.vim vim-patch:9.1.0586: ocaml runtime files are outdated 2024-07-14 23:55:57 +02:00
occam.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
odin.vim vim-patch:211211052d04 (#27048) 2024-01-16 23:08:41 +00:00
pascal.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
perl.vim vim-patch:4e554d282c50 2023-09-09 08:29:50 +02:00
php.vim vim-patch:3170342af304 2023-09-05 08:48:47 +02:00
postscr.vim vim-patch:partial 2d8ed0203aed (#18675) 2022-05-23 23:49:38 +02:00
pov.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
prolog.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
proto.vim vim-patch:39eff4c: runtime(proto): Add indent script for protobuf filetype 2024-08-08 00:17:11 +02:00
ps1.vim vim-patch:130cbfc31235 2021-05-02 12:03:34 -04:00
pyrex.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
python.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
qb64.vim vim-patch:partial:f10911e5db16 (#17248) 2022-01-31 15:27:01 +01:00
qml.vim vim-patch:50dbe16cd818 2024-01-24 11:05:25 +01:00
quarto.vim vim-patch:partial:dd60c365cd26 (#22437) 2023-02-28 09:34:27 +01:00
query.lua docs: misc (#31138) 2024-11-21 06:50:30 +08:00
r.vim vim-patch:f9ca139e3aa1 (#27554) 2024-02-21 06:30:18 +08:00
racket.vim vim-patch:8e013b1: runtime(racket): update Racket runtime files 2024-11-14 09:35:11 +01:00
raku.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
raml.vim vim-patch:ba3ff539303c 2019-07-29 20:50:07 +02:00
rapid.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
readline.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
README.txt vim-patch:96d6c4aabed1 2023-08-23 20:31:08 +01:00
rhelp.vim vim-patch:f9ca139e3aa1 (#27554) 2024-02-21 06:30:18 +08:00
rmd.vim vim-patch:f9ca139e3aa1 (#27554) 2024-02-21 06:30:18 +08:00
rnoweb.vim vim-patch:f9ca139e3aa1 (#27554) 2024-02-21 06:30:18 +08:00
rpl.vim vim-patch:cb80aa2d53e5 2021-05-01 22:29:02 -04:00
rrst.vim vim-patch:f9ca139e3aa1 (#27554) 2024-02-21 06:30:18 +08:00
rst.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
ruby.vim vim-patch:da16a1b471aa 2023-09-02 11:08:29 +02:00
rust.vim vim-patch:11d5992: runtime(rust): use shiftwidth() in indent script 2024-07-04 23:01:35 +02:00
sas.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
sass.vim vim-patch:a907c9199216 2023-12-29 00:54:09 +01:00
scala.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
scheme.vim vim-patch:17e0a19: runtime(scheme): update runtime files 2024-06-21 11:03:47 +02:00
scss.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
sdl.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
sh.vim vim-patch:0acd3ab: runtime(sh): better function support for bash/zsh in indent script 2024-11-15 09:32:15 +01:00
sml.vim vim-patch:partial:cbaff5e06ec5 (#18042) 2022-04-08 19:53:41 +02:00
solidity.vim vim-patch:e34b51e95fd0 2023-08-24 11:33:06 +09:00
sql.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
sqlanywhere.vim vim-patch:2286304cdbba 2021-10-16 18:03:51 +02:00
sshconfig.vim vim-patch:388a5d4f20b4 2021-04-28 21:29:57 -04:00
stylus.vim vim-patch:9.1.0386: filetype: stylus files not recognized 2024-05-02 00:37:16 +02:00
systemverilog.vim vim-patch:dbf749bd5aae (#25665) 2023-10-16 16:36:25 +08:00
tcl.vim vim-patch:6e649224926b (#15911) 2021-10-05 14:12:16 +02:00
tcsh.vim vim-patch:2286304cdbba 2021-10-16 18:03:51 +02:00
teraterm.vim vim-patch:partial 079ba76ae7a7 (#16126) 2021-10-23 22:29:17 +02:00
terraform.vim vim-patch:150b507: runtime(hcl,terraform): Add runtime files for HCL and Terraform (#30266) 2024-09-04 19:32:52 -05:00
tex.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
tf.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
thrift.vim vim-patch:011f222: runtime(thrift): add ftplugin, indent and syntax scripts 2024-07-30 10:39:43 +02:00
tilde.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
treetop.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
typescript.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
typescriptreact.vim vim-patch:813a538bb3ce 2023-11-25 17:33:05 +01:00
typst.vim vim-patch:b66cac1: runtime(typst): add definition lists to formatlistpat, update maintainer 2024-12-10 08:06:35 +01:00
vb.vim vim-patch:partial:f1dcd14fc5d4 (#21602) 2023-01-01 15:00:39 +01:00
verilog.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
vhdl.vim vim-patch:0382f05dbd65 2023-08-29 11:32:46 +02:00
vim.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
vroom.vim vim-patch:1e8ebf8 2014-12-30 13:51:39 +01:00
vue.vim vim-patch:partial:f1dcd14fc5d4 (#21602) 2023-01-01 15:00:39 +01:00
wat.vim vim-patch:9.0.2104: wast filetype should be replaced by wat filetype 2023-11-14 21:51:28 +01:00
xf86conf.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
xhtml.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
xinetd.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
xml.vim vim-patch:partial fa3b72348d88 (#16780) 2021-12-26 11:03:25 +01:00
xsd.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
xslt.vim re-integrate runtime/ vim-patch:0 #938 2014-07-29 02:12:31 +00:00
yacc.vim vim-patch:ce001a337e28 (#18287) 2022-04-27 17:48:35 +02:00
yaml.vim vim-patch:c6ed816: runtime(yaml): do not re-indent when commenting out lines 2024-08-17 13:03:13 +02:00
zig.vim vim-patch:86b4816766d9 (#21314) 2022-12-08 16:33:38 +01:00
zimbu.vim vim-patch:e978b4534a5e (#24697) 2023-08-13 13:25:10 +01:00
zsh.vim vim-patch:f2571c6 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.

To test the indent file, see testdir/README.txt.