* recognize NimScript files * automatically set up tab width in Nim buffers * remove the NimLog in the python module, which is just a debugging aid
23 lines
426 B
VimL
23 lines
426 B
VimL
if exists("current_compiler")
|
|
finish
|
|
endif
|
|
|
|
let current_compiler = "nim"
|
|
|
|
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
|
command -nargs=* CompilerSet setlocal <args>
|
|
endif
|
|
|
|
let s:cpo_save = &cpo
|
|
set cpo-=C
|
|
|
|
CompilerSet makeprg=nim\ c\ --verbosity:0\ $*\ %:p
|
|
|
|
CompilerSet errorformat=
|
|
\%-GHint:\ %m,
|
|
\%E%f(%l\\,\ %c)\ Error:\ %m,
|
|
\%W%f(%l\\,\ %c)\ Hint:\ %m
|
|
|
|
let &cpo = s:cpo_save
|
|
unlet s:cpo_save
|
|
|