aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /runtime/syntax
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/2html.vim393
-rw-r--r--runtime/syntax/c.vim2
-rw-r--r--runtime/syntax/cabal.vim21
-rw-r--r--runtime/syntax/chatito.vim62
-rw-r--r--runtime/syntax/checkhealth.vim21
-rw-r--r--runtime/syntax/cs.vim19
-rw-r--r--runtime/syntax/debchangelog.vim6
-rw-r--r--runtime/syntax/debsources.vim6
-rw-r--r--runtime/syntax/desktop.vim6
-rw-r--r--runtime/syntax/editorconfig.vim17
-rw-r--r--runtime/syntax/erlang.vim17
-rw-r--r--runtime/syntax/fstab.vim285
-rw-r--r--runtime/syntax/gdresource.vim65
-rw-r--r--runtime/syntax/gdscript.vim103
-rw-r--r--runtime/syntax/gdshader.vim57
-rw-r--r--runtime/syntax/gitattributes.vim63
-rw-r--r--runtime/syntax/gitignore.vim29
-rw-r--r--runtime/syntax/go.vim115
-rw-r--r--runtime/syntax/gyp.vim49
-rw-r--r--runtime/syntax/hare.vim133
-rw-r--r--runtime/syntax/help.vim10
-rw-r--r--runtime/syntax/hgcommit.vim21
-rw-r--r--runtime/syntax/hlsplaylist.vim120
-rw-r--r--runtime/syntax/hollywood.vim20
-rw-r--r--runtime/syntax/html.vim12
-rw-r--r--runtime/syntax/lua.vim317
-rw-r--r--runtime/syntax/lyrics.vim43
-rw-r--r--runtime/syntax/make.vim6
-rw-r--r--runtime/syntax/markdown.vim89
-rw-r--r--runtime/syntax/mermaid.vim155
-rw-r--r--runtime/syntax/modula3.vim101
-rw-r--r--runtime/syntax/nix.vim210
-rw-r--r--runtime/syntax/nsis.vim32
-rw-r--r--runtime/syntax/obse.vim3360
-rw-r--r--runtime/syntax/openvpn.vim72
-rw-r--r--runtime/syntax/plsql.vim153
-rw-r--r--runtime/syntax/poefilter.vim167
-rw-r--r--runtime/syntax/ptcap.vim2
-rw-r--r--runtime/syntax/racket.vim656
-rw-r--r--runtime/syntax/rego.vim63
-rw-r--r--runtime/syntax/sed.vim105
-rw-r--r--runtime/syntax/sh.vim53
-rw-r--r--runtime/syntax/shared/hgcommitDiff.vim390
-rw-r--r--runtime/syntax/solidity.vim173
-rw-r--r--runtime/syntax/srt.vim62
-rw-r--r--runtime/syntax/ssa.vim63
-rw-r--r--runtime/syntax/sshconfig.vim27
-rw-r--r--runtime/syntax/sshdconfig.vim18
-rw-r--r--runtime/syntax/swayconfig.vim28
-rw-r--r--runtime/syntax/synload.vim2
-rw-r--r--runtime/syntax/syntax.vim7
-rw-r--r--runtime/syntax/vdf.vim54
-rw-r--r--runtime/syntax/vim.vim6
-rw-r--r--runtime/syntax/wdl.vim41
-rw-r--r--runtime/syntax/zig.vim292
-rw-r--r--runtime/syntax/zir.vim49
-rw-r--r--runtime/syntax/zsh.vim163
57 files changed, 7914 insertions, 697 deletions
diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim
index 8adbd76950..ce6797deaa 100644
--- a/runtime/syntax/2html.vim
+++ b/runtime/syntax/2html.vim
@@ -1,6 +1,6 @@
" Vim syntax support file
" Maintainer: Ben Fritz <fritzophrenic@gmail.com>
-" Last Change: 2020 Jan 05
+" Last Change: 2022 Dec 26
"
" Additional contributors:
"
@@ -815,202 +815,204 @@ endif
" HTML header, with the title and generator ;-). Left free space for the CSS,
" to be filled at the end.
-call extend(s:lines, [
- \ "<html>",
- \ "<head>"])
-" include encoding as close to the top as possible, but only if not already
-" contained in XML information (to avoid haggling over content type)
-if s:settings.encoding != "" && !s:settings.use_xhtml
- if s:html5
- call add(s:lines, '<meta charset="' . s:settings.encoding . '"' . s:tag_close)
- else
- call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . s:tag_close)
- endif
-endif
-call extend(s:lines, [
- \ ("<title>".expand("%:p:~")."</title>"),
- \ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close),
- \ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close)
- \ ])
-call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close)
-call add(s:lines, '<meta name="settings" content="'.
- \ join(filter(keys(s:settings),'s:settings[v:val]'),',').
- \ ',prevent_copy='.s:settings.prevent_copy.
- \ ',use_input_for_pc='.s:settings.use_input_for_pc.
- \ '"'.s:tag_close)
-call add(s:lines, '<meta name="colorscheme" content="'.
- \ (exists('g:colors_name')
- \ ? g:colors_name
- \ : 'none'). '"'.s:tag_close)
-
-if s:settings.use_css
+if !s:settings.no_doc
call extend(s:lines, [
- \ "<style" . (s:html5 ? "" : " type=\"text/css\"") . ">",
- \ s:settings.use_xhtml ? "" : "<!--"])
- let s:ieonly = []
- if s:settings.dynamic_folds
- if s:settings.hover_unfold
- " if we are doing hover_unfold, use css 2 with css 1 fallback for IE6
- call extend(s:lines, [
- \ ".FoldColumn { text-decoration: none; white-space: pre; }",
- \ "",
- \ "body * { margin: 0; padding: 0; }", "",
- \ ".open-fold > span.Folded { display: none; }",
- \ ".open-fold > .fulltext { display: inline; }",
- \ ".closed-fold > .fulltext { display: none; }",
- \ ".closed-fold > span.Folded { display: inline; }",
- \ "",
- \ ".open-fold > .toggle-open { display: none; }",
- \ ".open-fold > .toggle-closed { display: inline; }",
- \ ".closed-fold > .toggle-open { display: inline; }",
- \ ".closed-fold > .toggle-closed { display: none; }",
- \ "", "",
- \ '/* opening a fold while hovering won''t be supported by IE6 and other',
- \ "similar browsers, but it should fail gracefully. */",
- \ ".closed-fold:hover > .fulltext { display: inline; }",
- \ ".closed-fold:hover > .toggle-filler { display: none; }",
- \ ".closed-fold:hover > .Folded { display: none; }"])
- " TODO: IE6 is REALLY old and I can't even test it anymore. Maybe we
- " should remove this? Leave it in for now, it was working at one point,
- " and doesn't affect any modern browsers. Even newer IE versions should
- " support the above code and ignore the following.
- let s:ieonly = [
- \ "<!--[if lt IE 7]><style type=\"text/css\">",
- \ ".open-fold .fulltext { display: inline; }",
- \ ".open-fold span.Folded { display: none; }",
- \ ".open-fold .toggle-open { display: none; }",
- \ ".open-fold .toggle-closed { display: inline; }",
- \ "",
- \ ".closed-fold .fulltext { display: none; }",
- \ ".closed-fold span.Folded { display: inline; }",
- \ ".closed-fold .toggle-open { display: inline; }",
- \ ".closed-fold .toggle-closed { display: none; }",
- \ "</style>",
- \ "<![endif]-->",
- \]
+ \ "<html>",
+ \ "<head>"])
+ " include encoding as close to the top as possible, but only if not already
+ " contained in XML information (to avoid haggling over content type)
+ if s:settings.encoding != "" && !s:settings.use_xhtml
+ if s:html5
+ call add(s:lines, '<meta charset="' . s:settings.encoding . '"' . s:tag_close)
else
- " if we aren't doing hover_unfold, use CSS 1 only
- call extend(s:lines, [
- \ ".FoldColumn { text-decoration: none; white-space: pre; }",
- \ ".open-fold .fulltext { display: inline; }",
- \ ".open-fold span.Folded { display: none; }",
- \ ".open-fold .toggle-open { display: none; }",
- \ ".open-fold .toggle-closed { display: inline; }",
- \ "",
- \ ".closed-fold .fulltext { display: none; }",
- \ ".closed-fold span.Folded { display: inline; }",
- \ ".closed-fold .toggle-open { display: inline; }",
- \ ".closed-fold .toggle-closed { display: none; }",
- \])
+ call add(s:lines, "<meta http-equiv=\"content-type\" content=\"text/html; charset=" . s:settings.encoding . '"' . s:tag_close)
endif
endif
- " else we aren't doing any dynamic folding, no need for any special rules
-
call extend(s:lines, [
- \ s:settings.use_xhtml ? "" : '-->',
- \ "</style>",
- \])
- call extend(s:lines, s:ieonly)
- unlet s:ieonly
-endif
+ \ ("<title>".expand("%:p:~")."</title>"),
+ \ ("<meta name=\"Generator\" content=\"Vim/".v:version/100.".".v:version%100.'"'.s:tag_close),
+ \ ("<meta name=\"plugin-version\" content=\"".s:pluginversion.'"'.s:tag_close)
+ \ ])
+ call add(s:lines, '<meta name="syntax" content="'.s:current_syntax.'"'.s:tag_close)
+ call add(s:lines, '<meta name="settings" content="'.
+ \ join(filter(keys(s:settings),'s:settings[v:val]'),',').
+ \ ',prevent_copy='.s:settings.prevent_copy.
+ \ ',use_input_for_pc='.s:settings.use_input_for_pc.
+ \ '"'.s:tag_close)
+ call add(s:lines, '<meta name="colorscheme" content="'.
+ \ (exists('g:colors_name')
+ \ ? g:colors_name
+ \ : 'none'). '"'.s:tag_close)
-let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
+ if s:settings.use_css
+ call extend(s:lines, [
+ \ "<style" . (s:html5 ? "" : " type=\"text/css\"") . ">",
+ \ s:settings.use_xhtml ? "" : "<!--"])
+ let s:ieonly = []
+ if s:settings.dynamic_folds
+ if s:settings.hover_unfold
+ " if we are doing hover_unfold, use css 2 with css 1 fallback for IE6
+ call extend(s:lines, [
+ \ ".FoldColumn { text-decoration: none; white-space: pre; }",
+ \ "",
+ \ "body * { margin: 0; padding: 0; }", "",
+ \ ".open-fold > span.Folded { display: none; }",
+ \ ".open-fold > .fulltext { display: inline; }",
+ \ ".closed-fold > .fulltext { display: none; }",
+ \ ".closed-fold > span.Folded { display: inline; }",
+ \ "",
+ \ ".open-fold > .toggle-open { display: none; }",
+ \ ".open-fold > .toggle-closed { display: inline; }",
+ \ ".closed-fold > .toggle-open { display: inline; }",
+ \ ".closed-fold > .toggle-closed { display: none; }",
+ \ "", "",
+ \ '/* opening a fold while hovering won''t be supported by IE6 and other',
+ \ "similar browsers, but it should fail gracefully. */",
+ \ ".closed-fold:hover > .fulltext { display: inline; }",
+ \ ".closed-fold:hover > .toggle-filler { display: none; }",
+ \ ".closed-fold:hover > .Folded { display: none; }"])
+ " TODO: IE6 is REALLY old and I can't even test it anymore. Maybe we
+ " should remove this? Leave it in for now, it was working at one point,
+ " and doesn't affect any modern browsers. Even newer IE versions should
+ " support the above code and ignore the following.
+ let s:ieonly = [
+ \ "<!--[if lt IE 7]><style type=\"text/css\">",
+ \ ".open-fold .fulltext { display: inline; }",
+ \ ".open-fold span.Folded { display: none; }",
+ \ ".open-fold .toggle-open { display: none; }",
+ \ ".open-fold .toggle-closed { display: inline; }",
+ \ "",
+ \ ".closed-fold .fulltext { display: none; }",
+ \ ".closed-fold span.Folded { display: inline; }",
+ \ ".closed-fold .toggle-open { display: inline; }",
+ \ ".closed-fold .toggle-closed { display: none; }",
+ \ "</style>",
+ \ "<![endif]-->",
+ \]
+ else
+ " if we aren't doing hover_unfold, use CSS 1 only
+ call extend(s:lines, [
+ \ ".FoldColumn { text-decoration: none; white-space: pre; }",
+ \ ".open-fold .fulltext { display: inline; }",
+ \ ".open-fold span.Folded { display: none; }",
+ \ ".open-fold .toggle-open { display: none; }",
+ \ ".open-fold .toggle-closed { display: inline; }",
+ \ "",
+ \ ".closed-fold .fulltext { display: none; }",
+ \ ".closed-fold span.Folded { display: inline; }",
+ \ ".closed-fold .toggle-open { display: inline; }",
+ \ ".closed-fold .toggle-closed { display: none; }",
+ \])
+ endif
+ endif
+ " else we aren't doing any dynamic folding, no need for any special rules
-" insert script tag if needed
-if s:uses_script
- call extend(s:lines, [
- \ "",
- \ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
- \ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
-endif
+ call extend(s:lines, [
+ \ s:settings.use_xhtml ? "" : '-->',
+ \ "</style>",
+ \])
+ call extend(s:lines, s:ieonly)
+ unlet s:ieonly
+ endif
-" insert javascript to toggle folds open and closed
-if s:settings.dynamic_folds
- call extend(s:lines, [
- \ "",
- \ "function toggleFold(objID)",
- \ "{",
- \ " var fold;",
- \ " fold = document.getElementById(objID);",
- \ " if (fold.className == 'closed-fold')",
- \ " {",
- \ " fold.className = 'open-fold';",
- \ " }",
- \ " else if (fold.className == 'open-fold')",
- \ " {",
- \ " fold.className = 'closed-fold';",
- \ " }",
- \ "}"
- \ ])
-endif
+ let s:uses_script = s:settings.dynamic_folds || s:settings.line_ids
-if s:settings.line_ids
- " insert javascript to get IDs from line numbers, and to open a fold before
- " jumping to any lines contained therein
- call extend(s:lines, [
- \ "",
- \ "/* function to open any folds containing a jumped-to line before jumping to it */",
- \ "function JumpToLine()",
- \ "{",
- \ " var lineNum;",
- \ " lineNum = window.location.hash;",
- \ " lineNum = lineNum.substr(1); /* strip off '#' */",
- \ "",
- \ " if (lineNum.indexOf('L') == -1) {",
- \ " lineNum = 'L'+lineNum;",
- \ " }",
- \ " var lineElem = document.getElementById(lineNum);"
- \ ])
+ " insert script tag if needed
+ if s:uses_script
+ call extend(s:lines, [
+ \ "",
+ \ "<script" . (s:html5 ? "" : " type='text/javascript'") . ">",
+ \ s:settings.use_xhtml ? '//<![CDATA[' : "<!--"])
+ endif
+ " insert javascript to toggle folds open and closed
if s:settings.dynamic_folds
call extend(s:lines, [
\ "",
- \ " /* navigate upwards in the DOM tree to open all folds containing the line */",
- \ " var node = lineElem;",
- \ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
+ \ "function toggleFold(objID)",
+ \ "{",
+ \ " var fold;",
+ \ " fold = document.getElementById(objID);",
+ \ " if (fold.className == 'closed-fold')",
+ \ " {",
+ \ " fold.className = 'open-fold';",
+ \ " }",
+ \ " else if (fold.className == 'open-fold')",
\ " {",
- \ " if (node.className == 'closed-fold')",
- \ " {",
- \ " node.className = 'open-fold';",
- \ " }",
- \ " node = node.parentNode;",
+ \ " fold.className = 'closed-fold';",
\ " }",
+ \ "}"
\ ])
endif
- call extend(s:lines, [
- \ " /* Always jump to new location even if the line was hidden inside a fold, or",
- \ " * we corrected the raw number to a line ID.",
- \ " */",
- \ " if (lineElem) {",
- \ " lineElem.scrollIntoView(true);",
- \ " }",
- \ " return true;",
- \ "}",
- \ "if ('onhashchange' in window) {",
- \ " window.onhashchange = JumpToLine;",
- \ "}"
- \ ])
-endif
-" insert script closing tag if needed
-if s:uses_script
- call extend(s:lines, [
- \ '',
- \ s:settings.use_xhtml ? '//]]>' : '-->',
- \ "</script>"
- \ ])
-endif
+ if s:settings.line_ids
+ " insert javascript to get IDs from line numbers, and to open a fold before
+ " jumping to any lines contained therein
+ call extend(s:lines, [
+ \ "",
+ \ "/* function to open any folds containing a jumped-to line before jumping to it */",
+ \ "function JumpToLine()",
+ \ "{",
+ \ " var lineNum;",
+ \ " lineNum = window.location.hash;",
+ \ " lineNum = lineNum.substr(1); /* strip off '#' */",
+ \ "",
+ \ " if (lineNum.indexOf('L') == -1) {",
+ \ " lineNum = 'L'+lineNum;",
+ \ " }",
+ \ " var lineElem = document.getElementById(lineNum);"
+ \ ])
+
+ if s:settings.dynamic_folds
+ call extend(s:lines, [
+ \ "",
+ \ " /* navigate upwards in the DOM tree to open all folds containing the line */",
+ \ " var node = lineElem;",
+ \ " while (node && node.id != 'vimCodeElement".s:settings.id_suffix."')",
+ \ " {",
+ \ " if (node.className == 'closed-fold')",
+ \ " {",
+ \ " node.className = 'open-fold';",
+ \ " }",
+ \ " node = node.parentNode;",
+ \ " }",
+ \ ])
+ endif
+ call extend(s:lines, [
+ \ " /* Always jump to new location even if the line was hidden inside a fold, or",
+ \ " * we corrected the raw number to a line ID.",
+ \ " */",
+ \ " if (lineElem) {",
+ \ " lineElem.scrollIntoView(true);",
+ \ " }",
+ \ " return true;",
+ \ "}",
+ \ "if ('onhashchange' in window) {",
+ \ " window.onhashchange = JumpToLine;",
+ \ "}"
+ \ ])
+ endif
-call extend(s:lines, ["</head>",
- \ "<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"])
+ " insert script closing tag if needed
+ if s:uses_script
+ call extend(s:lines, [
+ \ '',
+ \ s:settings.use_xhtml ? '//]]>' : '-->',
+ \ "</script>"
+ \ ])
+ endif
+
+ call extend(s:lines, ["</head>",
+ \ "<body".(s:settings.line_ids ? " onload='JumpToLine();'" : "").">"])
+endif
if s:settings.no_pre
" if we're not using CSS we use a font tag which can't have a div inside
if s:settings.use_css
- call extend(s:lines, ["<div id='vimCodeElement".s:settings.id_suffix."'>"])
+ call extend(s:lines, ["<div id='vimCodeElement" .. s:settings.id_suffix .. "'>"])
endif
else
- call extend(s:lines, ["<pre id='vimCodeElement".s:settings.id_suffix."'>"])
+ call extend(s:lines, ["<pre id='vimCodeElement" .. s:settings.id_suffix .. "'>"])
endif
exe s:orgwin . "wincmd w"
@@ -1721,12 +1723,15 @@ endif
if s:settings.no_pre
if !s:settings.use_css
" Close off the font tag that encapsulates the whole <body>
- call extend(s:lines, ["</font>", "</body>", "</html>"])
+ call extend(s:lines, ["</font>"])
else
- call extend(s:lines, ["</div>", "</body>", "</html>"])
+ call extend(s:lines, ["</div>"])
endif
else
- call extend(s:lines, ["</pre>", "</body>", "</html>"])
+ call extend(s:lines, ["</pre>"])
+endif
+if !s:settings.no_doc
+ call extend(s:lines, ["</body>", "</html>"])
endif
exe s:newwin . "wincmd w"
@@ -1742,15 +1747,15 @@ unlet s:lines
" The generated HTML is admittedly ugly and takes a LONG time to fold.
" Make sure the user doesn't do syntax folding when loading a generated file,
" using a modeline.
-call append(line('$'), "<!-- vim: set foldmethod=manual : -->")
+if !s:settings.no_modeline
+ call append(line('$'), "<!-- vim: set foldmethod=manual : -->")
+endif
" Now, when we finally know which, we define the colors and styles
-if s:settings.use_css
+if s:settings.use_css && !s:settings.no_doc
1;/<style\>/+1
-endif
-" Normal/global attributes
-if s:settings.use_css
+ " Normal/global attributes
if s:settings.no_pre
call append('.', "body { color: " . s:fgc . "; background-color: " . s:bgc . "; font-family: ". s:htmlfont ."; }")
+
@@ -1874,7 +1879,9 @@ if s:settings.use_css
endif
endif
endif
-else
+endif
+
+if !s:settings.use_css && !s:settings.no_doc
" For Netscape 4, set <body> attributes too, though, strictly speaking, it's
" incorrect.
execute '%s:<body\([^>]*\):<body bgcolor="' . s:bgc . '" text="' . s:fgc . '"\1>\r<font face="'. s:htmlfont .'"'
@@ -1882,7 +1889,7 @@ endif
" Gather attributes for all other classes. Do diff first so that normal
" highlight groups are inserted before it.
-if s:settings.use_css
+if s:settings.use_css && !s:settings.no_doc
if s:diff_mode
call append('.', filter(map(keys(s:diffstylelist), "s:diffstylelist[v:val]"), 'v:val != ""'))
endif
@@ -1892,20 +1899,22 @@ if s:settings.use_css
endif
" Add hyperlinks
-" TODO: add option to not do this? Maybe just make the color the same as the
-" text highlight group normally is?
-%s+\(https\=://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|&gt;\|&lt;\|&quot;\)+<a href="\1">\1</a>\2+ge
+if !s:settings.no_links
+ %s+\(https\=://\S\{-}\)\(\([.,;:}]\=\(\s\|$\)\)\|[\\"'<>]\|&gt;\|&lt;\|&quot;\)+<a href="\1">\1</a>\2+ge
+endif
" The DTD
-if s:settings.use_xhtml
- exe "normal! gg$a\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
-elseif s:html5
- exe "normal! gg0i<!DOCTYPE html>\n"
-else
- exe "normal! gg0i<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"
+if !s:settings.no_doc
+ if s:settings.use_xhtml
+ exe "normal! gg$a\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
+ elseif s:html5
+ exe "normal! gg0i<!DOCTYPE html>\n"
+ else
+ exe "normal! gg0i<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n"
+ endif
endif
-if s:settings.use_xhtml
+if s:settings.use_xhtml && !s:settings.no_doc
exe "normal! gg/<html/e\na xmlns=\"http://www.w3.org/1999/xhtml\"\e"
endif
diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim
index 890e9ae1a7..50878a78ea 100644
--- a/runtime/syntax/c.vim
+++ b/runtime/syntax/c.vim
@@ -1,7 +1,7 @@
" Vim syntax file
" Language: C
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last Change: 2022 Apr 24
+" Last Change: 2022 Oct 05
" Quit when a (custom) syntax file was already loaded
if exists("b:current_syntax")
diff --git a/runtime/syntax/cabal.vim b/runtime/syntax/cabal.vim
index 92e6b8331e..74cda51266 100644
--- a/runtime/syntax/cabal.vim
+++ b/runtime/syntax/cabal.vim
@@ -4,7 +4,9 @@
" Maintainer: Marcin Szamotulski <profunctor@pm.me>
" Previous Maintainer: Vincent Berthoux <twinside@gmail.com>
" File Types: .cabal
-" Last Change: 21 Nov 2020
+" Last Change: 22 Oct 2022
+" v1.6: Added support for foreign-libraries
+" Added highlighting for various fields
" v1.5: Incorporated changes from
" https://github.com/sdiehl/haskell-vim-proto/blob/master/vim/syntax/cabal.vim
" Use `syn keyword` instead of `syn match`.
@@ -61,13 +63,14 @@ syn keyword cabalCategory contained
\ test-suite
\ source-repository
\ flag
+ \ foreign-library
\ custom-setup
\ common
syn match cabalCategoryTitle contained /[^{]*\ze{\?/
syn match cabalCategoryRegion
\ contains=cabalCategory,cabalCategoryTitle
\ nextgroup=cabalCategory skipwhite
- \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
+ \ /^\c\s*\(contained\|executable\|library\|benchmark\|test-suite\|source-repository\|flag\|foreign-library\|custom-setup\|common\)\+\s*\%(.*$\|$\)/
syn keyword cabalTruth true false
" cabalStatementRegion which limits the scope of cabalStatement keywords, this
@@ -77,6 +80,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ default-language
\ default-extensions
\ author
+ \ autogen-includes
\ autogen-modules
\ asm-sources
\ asm-options
@@ -84,7 +88,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ bug-reports
\ build-depends
\ build-tools
- \ build-tools-depends
+ \ build-tool-depends
\ build-type
\ buildable
\ c-sources
@@ -95,6 +99,7 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ cmm-sources
\ cmm-options
\ cpp-options
+ \ cxx-options
\ cxx-sources
\ data-dir
\ data-files
@@ -111,7 +116,9 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ extra-framework-dirs
\ extra-ghci-libraries
\ extra-lib-dirs
+ \ extra-lib-dirs-static
\ extra-libraries
+ \ extra-libraries-static
\ extra-library-flavours
\ extra-source-files
\ extra-tmp-files
@@ -133,6 +140,8 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ install-includes
\ js-sources
\ ld-options
+ \ lib-version-info
+ \ lib-version-linux
\ license
\ license-file
\ location
@@ -141,20 +150,26 @@ syn keyword cabalStatement contained containedin=cabalStatementRegion
\ manual
\ mixins
\ module
+ \ mod-def-file
\ name
\ nhc98-options
+ \ options
\ other-extensions
\ other-language
\ other-languages
\ other-modules
\ package-url
\ pkgconfig-depends
+ \ scope
\ setup-depends
+ \ signatures
\ stability
\ subdir
\ synopsis
+ \ reexported-modules
\ tag
\ tested-with
+ \ test-module
\ type
\ version
\ virtual-modules
diff --git a/runtime/syntax/chatito.vim b/runtime/syntax/chatito.vim
new file mode 100644
index 0000000000..d89307cf06
--- /dev/null
+++ b/runtime/syntax/chatito.vim</