summaryrefslogtreecommitdiffstats
path: root/runtime/doc
diff options
context:
space:
mode:
authorWu, Zhenyu <wuzhenyu@ustc.edu>2024-04-08 20:53:19 +0200
committerChristian Brabandt <cb@256bit.org>2024-04-08 21:45:40 +0200
commit7005b7ee7f282b24378c2a844366cb8616cad5d7 (patch)
tree7c57d26b41f359653d956b5fa7377aeb5242864c /runtime/doc
parentfc21b6437ce91368c2d53437177083b8bc375720 (diff)
patch 9.1.0276: No pandoc syntax supportv9.1.0276
Problem: No pandoc syntax support Solution: Add pandoc syntax and compiler plugins (Wu, Zhenyu, Konfekt) closes: #14389 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com> Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/filetype.txt5
-rw-r--r--runtime/doc/syntax.txt91
-rw-r--r--runtime/doc/tags1
3 files changed, 95 insertions, 2 deletions
diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt
index dba8ee2e47..aa7c9ae0c5 100644
--- a/runtime/doc/filetype.txt
+++ b/runtime/doc/filetype.txt
@@ -1,4 +1,4 @@
-*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 03
+*filetype.txt* For Vim version 9.1. Last change: 2024 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -157,6 +157,8 @@ variables can be used to overrule the filetype used for certain extensions:
*.inc g:filetype_inc
*.lsl g:filetype_lsl
*.m g:filetype_m |ft-mathematica-syntax|
+ *.markdown,*.mdown,*.mkd,*.mkdn,*.mdwn,*.md
+ g:filetype_md |ft-pandoc-syntax|
*.mod g:filetype_mod
*.p g:filetype_p |ft-pascal-syntax|
*.pl g:filetype_pl
@@ -172,6 +174,7 @@ variables can be used to overrule the filetype used for certain extensions:
*.typ g:filetype_typ
*.v g:filetype_v
*.w g:filetype_w |ft-cweb-syntax|
+ *.md g:pandoc#filetypes#pandoc_markdown
For a few filetypes the global variable is used only when the filetype could
not be detected:
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index de8a665e16..3dcbdbf2e6 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2024 Mar 10
+*syntax.txt* For Vim version 9.1. Last change: 2024 Apr 08
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -2467,6 +2467,95 @@ by the camlp4 preprocessor. Setting the variable >
prevents highlighting of "end" as error, which is useful when sources
contain very long structures that Vim does not synchronize anymore.
+PANDOC *ft-pandoc-syntax*
+
+By default, markdown files will be detected as filetype "markdown".
+Alternatively, you may want them to be detected as filetype "pandoc" instead.
+To do so, set the following: >
+
+ :let g:markdown_md = 'pandoc'
+
+The pandoc syntax plugin uses |conceal| for pretty highlighting. Default is 1 >
+
+ :let g:pandoc#syntax#conceal#use = 1
+
+To specify elements that should not be concealed, set the following variable: >
+
+ :let g:pandoc#syntax#conceal#blacklist = []
+
+This is a list of the rules wich can be used here:
+
+ - titleblock
+ - image
+ - block
+ - subscript
+ - superscript
+ - strikeout
+ - atx
+ - codeblock_start
+ - codeblock_delim
+ - footnote
+ - definition
+ - list
+ - newline
+ - dashes
+ - ellipses
+ - quotes
+ - inlinecode
+ - inlinemath
+
+You can customize the way concealing works. For example, if you prefer to mark
+footnotes with the `*` symbol: >
+
+ :let g:pandoc#syntax#conceal#cchar_overrides = {"footnote" : "*"}
+
+To conceal the urls in links, use: >
+
+ :let g:pandoc#syntax#conceal#urls = 1
+
+Prevent highlighting specific codeblock types so that they remain Normal.
+Codeblock types include "definition" for codeblocks inside definition blocks
+and "delimited" for delimited codeblocks. Default = [] >
+
+ :let g:pandoc#syntax#codeblocks#ignore = ['definition']
+
+Use embedded highlighting for delimited codeblocks where a language is
+specified. Default = 1 >
+
+ :let g:pandoc#syntax#codeblocks#embeds#use = 1
+
+For specify what languages and using what syntax files to highlight embeds. This is a
+list of language names. When the language pandoc and vim use don't match, you
+can use the "PANDOC=VIM" syntax. For example: >
+
+ :let g:pandoc#syntax#codeblocks#embeds#langs = ["ruby", "bash=sh"]
+
+To use italics and strong in emphases. Default = 1 >
+
+ :let *g:pandoc#syntax#style#emphases = 1
+
+"0" will add "block" to g:pandoc#syntax#conceal#blacklist, because otherwise
+you couldn't tell where the styles are applied.
+
+To add underline subscript, superscript and strikeout text styles. Default = 1 >
+
+ :let g:pandoc#syntax#style#underline_special = 1
+
+Detect and highlight definition lists. Disabling this can improve performance.
+Default = 1 (i.e., enabled by default) >
+
+ :let g:pandoc#syntax#style#use_definition_lists = 1
+
+The pandoc syntax script also comes with the following commands: >
+
+ :PandocHighlight LANG
+
+Enables embedded highlighting for language LANG in codeblocks. Uses the
+syntax for items in g:pandoc#syntax#codeblocks#embeds#langs. >
+
+ :PandocUnhighlight LANG
+
+Disables embedded highlighting for language LANG in codeblocks.
PAPP *papp.vim* *ft-papp-syntax*
diff --git a/runtime/doc/tags b/runtime/doc/tags
index 528538ebe9..a0d744f314 100644
--- a/runtime/doc/tags
+++ b/runtime/doc/tags
@@ -7322,6 +7322,7 @@ ft-nasm-syntax syntax.txt /*ft-nasm-syntax*
ft-ncf-syntax syntax.txt /*ft-ncf-syntax*
ft-nroff-syntax syntax.txt /*ft-nroff-syntax*
ft-ocaml-syntax syntax.txt /*ft-ocaml-syntax*
+ft-pandoc-syntax syntax.txt /*ft-pandoc-syntax*
ft-papp-syntax syntax.txt /*ft-papp-syntax*
ft-pascal-syntax syntax.txt /*ft-pascal-syntax*
ft-pdf-plugin filetype.txt /*ft-pdf-plugin*