Files
neovim/runtime/compiler/rime_deployer.vim
zeertzjq 5f93d27fba vim-patch:74b4f92: runtime(compiler): set errorformat where missing
As a matter of caution it sets it to the default gcc errorformat:

```
errorformat=%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-Gg%\?make[%*\d]: *** [%f:%l:%m,%-Gg%\?make: *** [%f:%l:%m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory %*[`']%f',%X%*\a[%*\d]: Leaving directory %*[`']%f',%D%*\a: Entering directory %*[`']%f',%X%*\a: Leaving directory %*[`']%f',%DMaking %*\a in %f,%f|%l| %m
```

so that the compiler keeps working after switching to others.

While likely only a subset is needed; such a subset has been proposed in
a commented errorformat;

checked to work for yamllint but ran out of steam for other compilers;

closes: vim/vim#18754

74b4f9242e

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-11-21 08:56:51 +08:00

34 lines
997 B
VimL

" Vim Compiler File
" Language: rime_deployer
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
" URL: https://rime.im
" Latest Revision: 2024-04-09
" Last Change: 2025 Nov 16 by The Vim Project (set errorformat)
if exists('b:current_compiler')
finish
endif
let b:current_compiler = 'rime_deployer'
let s:save_cpoptions = &cpoptions
set cpoptions&vim
" Android Termux
let s:prefix = getenv('PREFIX')
if s:prefix == v:null
let s:prefix = '/usr'
endif
" Android, NixOS, GNU/Linux, BSD
for s:shared_data_dir in ['/sdcard/rime-data', '/run/current-system/sw/share/rime-data', '/usr/local/share/rime-data', s:prefix . '/share/rime-data']
if isdirectory(s:shared_data_dir)
break
endif
endfor
execute 'CompilerSet makeprg=rime_deployer\ --build\ %:p:h:S\' s:shared_data_dir
unlet s:prefix s:shared_data_dir
" CompilerSet errorformat=%f:%l:%c:\ %m,%f:%l:\ %m
CompilerSet errorformat&
let &cpoptions = s:save_cpoptions
unlet s:save_cpoptions