neovim

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

rustc.vim (1510B)


      1 " Vim compiler file
      2 " Compiler:         Rust Compiler
      3 " Maintainer:       Chris Morgan <me@chrismorgan.info>
      4 " Latest Revision:  2023-09-11
      5 " 2025 Nov 15 by Vim project: remove test for Vim patch 7.4.191
      6 " 2025 Dec 18 by Vim project: detect more errors #18957
      7 " For bugs, patches and license go to https://github.com/rust-lang/rust.vim
      8 
      9 if exists("current_compiler")
     10    finish
     11 endif
     12 let current_compiler = "rustc"
     13 
     14 " vint: -ProhibitAbbreviationOption
     15 let s:save_cpo = &cpo
     16 set cpo&vim
     17 " vint: +ProhibitAbbreviationOption
     18 
     19 if get(g:, 'rustc_makeprg_no_percent', 0)
     20    CompilerSet makeprg=rustc
     21 else
     22    CompilerSet makeprg=rustc\ \%:S
     23 endif
     24 
     25 " New errorformat (after nightly 2016/08/10)
     26 CompilerSet errorformat=
     27            \%-G,
     28            \%-Gerror:\ aborting\ %.%#,
     29            \%-Gerror:\ Could\ not\ compile\ %.%#,
     30            \%Eerror:\ %m,
     31            \%Eerror[E%n]:\ %m,
     32            \%Wwarning:\ %m,
     33            \%Wwarning[E%n]:\ %m,
     34            \%Inote:\ %m,
     35            \%C\ %#-->\ %f:%l:%c,
     36            \%C\ %#╭▸\ %f:%l:%c,
     37            \%E\ \ left:%m,%C\ right:%m\ %f:%l:%c,%Z
     38 
     39 " Old errorformat (before nightly 2016/08/10)
     40 CompilerSet errorformat+=
     41            \%f:%l:%c:\ %t%*[^:]:\ %m,
     42            \%f:%l:%c:\ %*\\d:%*\\d\ %t%*[^:]:\ %m,
     43            \%-G%f:%l\ %s,
     44            \%-G%*[\ ]^,
     45            \%-G%*[\ ]^%*[~],
     46            \%-G%*[\ ]...
     47 
     48 " vint: -ProhibitAbbreviationOption
     49 let &cpo = s:save_cpo
     50 unlet s:save_cpo
     51 " vint: +ProhibitAbbreviationOption
     52 
     53 " vim: set et sw=4 sts=4 ts=8: