aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-04-16 08:13:21 +0800
committerGitHub <noreply@github.com>2024-04-16 08:13:21 +0800
commitb4ddee111679012194a1e3ba78299ac540c51c77 (patch)
tree6b94009c5481c9fec7ba386944b955e96e75e2ec
parent8c970d34034c874ab12b924a5e057997797868f4 (diff)
downloadrneovim-b4ddee111679012194a1e3ba78299ac540c51c77.tar.gz
rneovim-b4ddee111679012194a1e3ba78299ac540c51c77.tar.bz2
rneovim-b4ddee111679012194a1e3ba78299ac540c51c77.zip
vim-patch:fb8f31ea7d7f (#28356)
runtime(doc): document pandoc compiler and enable configuring arguments closes: vim/vim#14550 https://github.com/vim/vim/commit/fb8f31ea7d7f3f42e9bdce7b4434fd93fba8876f Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
-rw-r--r--runtime/compiler/pandoc.vim1
-rw-r--r--runtime/doc/quickfix.txt9
2 files changed, 10 insertions, 0 deletions
diff --git a/runtime/compiler/pandoc.vim b/runtime/compiler/pandoc.vim
index 1b171a1cb8..6c151930c5 100644
--- a/runtime/compiler/pandoc.vim
+++ b/runtime/compiler/pandoc.vim
@@ -46,6 +46,7 @@ execute 'CompilerSet makeprg=pandoc\ --standalone' .
\ '\ --metadata\ title=%:t:r:S' .
\ '\ --metadata\ lang=' . matchstr(&spelllang, '^\a\a') .
\ '\ --from=' . s:PandocFiletype(&filetype) .
+ \ '\ ' . escape(get(b:, 'pandoc_compiler_args', get(g:, 'pandoc_compiler_args', '')), ' ') .
\ '\ --output\ %:r:S.$*\ %:S'
CompilerSet errorformat="%f",\ line\ %l:\ %m
diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt
index 9037ecc0f9..b4c2b7c192 100644
--- a/runtime/doc/quickfix.txt
+++ b/runtime/doc/quickfix.txt
@@ -1282,6 +1282,15 @@ g:compiler_gcc_ignore_unmatched_lines
commands run from make are generating false
positives.
+PANDOC *quickfix-pandoc* *compiler-pandoc*
+
+The Pandoc compiler plugin expects that an output file type extension is
+passed to make, say :make html or :make pdf.
+
+Additional arguments can be passed to pandoc:
+
+- either by appending them to make, say `:make html --self-contained` .
+- or setting them in `b:pandoc_compiler_args` or `g:pandoc_compiler_args`
PERL *quickfix-perl* *compiler-perl*