Open johnridesabike opened 11 months ago
After a little bit of trial and error, I have an errorformat
that seems to mostly work:
if exists("g:current_compiler")
finish
endif
let current_compiler = "rescript"
if exists(":CompilerSet") != 2
command -nargs=* CompilerSet setlocal <args>
endif
CompilerSet makeprg=npx\ rescript\ $*
CompilerSet errorformat=
\%-GFAILED:%m,
\%-Grescript:%m,
\%E\ \ We've\ found\ a\ bug\ for\ you!,
\%E\ \ Syntax\ error!,
\%W\ \ Warning\ number\ %n%.%#,
\%C%f:%l:%c,
\%C%f:%l:%c-%k,
\%C%f:%l:%c-%e:%k,
\%-C\ \ %l\ %.%#,
\%-C\ \ \ \ %.%#,
\%-C\\s%#,
\%-G\\s%#,
\%C%m,
I'm not confident that it properly handles every error message though, and I've only tested it on ReScript 10. But in case anyone else wants to take a crack at it, this may be a starting point!
Since the commands like
:RescriptBuild
were removed, it would be very useful if this included support for Vim's built-inmakeprg
anderrorformat
features. I assumemakeprg
can just benpx rescript $*
, but I'm not skilled enough at usingerrorformat
to know what it needs to be.