neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

perl.vim (1374B)


      1 " Vim compiler file
      2 " Compiler:      Perl syntax checks (perl -Wc)
      3 " Maintainer:    vim-perl <vim-perl@googlegroups.com> (need to be subscribed to post)
      4 " Author:        Christian J. Robinson <heptite@gmail.com>
      5 " Homepage:      https://github.com/vim-perl/vim-perl
      6 " Bugs/requests: https://github.com/vim-perl/vim-perl/issues
      7 " License:       Vim License (see :help license)
      8 " Last Change:   2021 Nov 2
      9 "		2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
     10 
     11 if exists("current_compiler")
     12  finish
     13 endif
     14 let current_compiler = "perl"
     15 
     16 let s:savecpo = &cpo
     17 set cpo&vim
     18 
     19 if get(g:, 'perl_compiler_force_warnings', 1)
     20 let s:warnopt = 'W'
     21 else
     22 let s:warnopt = 'w'
     23 endif
     24 
     25 if getline(1) =~# '-[^ ]*T'
     26 let s:taintopt = 'T'
     27 else
     28 let s:taintopt = ''
     29 endif
     30 
     31 exe 'CompilerSet makeprg=perl\ -' . s:warnopt . s:taintopt . 'c\ %:S'
     32 
     33 CompilerSet errorformat=
     34 \%-G%.%#had\ compilation\ errors.,
     35 \%-G%.%#syntax\ OK,
     36 \%m\ at\ %f\ line\ %l.,
     37 \%+A%.%#\ at\ %f\ line\ %l\\,%.%#,
     38 \%+C%.%#
     39 
     40 " Explanation:
     41 " %-G%.%#had\ compilation\ errors.,  - Ignore the obvious.
     42 " %-G%.%#syntax\ OK,                 - Don't include the 'a-okay' message.
     43 " %m\ at\ %f\ line\ %l.,             - Most errors...
     44 " %+A%.%#\ at\ %f\ line\ %l\\,%.%#,  - As above, including ', near ...'
     45 " %+C%.%#                            -   ... Which can be multi-line.
     46 
     47 let &cpo = s:savecpo
     48 unlet s:savecpo