1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-22 17:55:10 +01:00
vim/runtime/compiler/context.vim

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.3 KiB
VimL
Raw Permalink Normal View History

2022-08-15 18:51:32 +01:00
vim9script
2016-10-23 21:21:08 +02:00
2022-08-15 18:51:32 +01:00
# Language: ConTeXt typesetting engine
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
# Contributors: Enno Nagel
# Last Change: 2024 Mar 29
# 2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
2022-08-15 18:51:32 +01:00
if exists("g:current_compiler")
2016-10-23 21:21:08 +02:00
finish
endif
2022-08-15 18:51:32 +01:00
import autoload '../autoload/context.vim'
g:current_compiler = 'context'
2016-10-23 21:21:08 +02:00
if get(b:, 'context_ignore_makefile', get(g:, 'context_ignore_makefile', 0)) ||
2022-08-15 18:51:32 +01:00
(!filereadable('Makefile') && !filereadable('makefile'))
var makeprg = join(context.ConTeXtCmd(shellescape(expand('%:p:t'))), ' ')
execute 'CompilerSet makeprg=' .. escape(makeprg, ' ')
2016-10-23 21:21:08 +02:00
else
2022-08-15 18:51:32 +01:00
g:current_compiler = 'make'
2016-10-23 21:21:08 +02:00
endif
2022-08-15 18:51:32 +01:00
const context_errorformat = join([
"%-Popen source%.%#> %f",
"%-Qclose source%.%#> %f",
"%-Popen source%.%#name '%f'",
"%-Qclose source%.%#name '%f'",
"tex %trror%.%#error on line %l in file %f: %m",
"%Elua %trror%.%#error on line %l in file %f:",
"%+Emetapost %#> error: %#",
"%Emetafun%.%#error: %m",
"! error: %#%m",
"%-C %#",
"%C! %m",
"%Z[ctxlua]%m",
"%+C<*> %.%#",
"%-C%.%#",
"%Z...%m",
"%-Zno-error",
"%-G%.%#"], ",")
execute 'CompilerSet errorformat=' .. escape(context_errorformat, ' ')
# vim: sw=2 fdm=marker