commit 13b46148f10ba19331ce3a1e8b97b19f53ed4644
parent d8fc0bdb83a47fb574428d3c52a63196f175a32b
Author: Byron Torres <b@torresjrjr.com>
Date: Mon, 23 Aug 2021 07:53:54 +0100
Add compiler/hare.vim
Diffstat:
2 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/compiler/hare.vim b/compiler/hare.vim
@@ -0,0 +1,28 @@
+" Vim compiler file
+" Compiler: Hare Compiler
+
+if exists("g:current_compiler")
+ finish
+endif
+let g:current_compiler = "hare"
+
+let s:cpo_save = &cpo
+set cpo&vim
+
+if exists(':CompilerSet') != 2
+ command -nargs=* CompilerSet setlocal <args>
+endif
+
+if filereadable("Makefile") || filereadable("makefile")
+ CompilerSet makeprg=make
+else
+ CompilerSet makeprg=hare\ build
+endif
+
+CompilerSet errorformat=
+ \Error\ %f:%l:%c:\ %m,
+ \Syntax\ error:\ %.%#\ at\ %f:%l:%c\\,\ %m,
+ \%-G%.%#
+
+let &cpo = s:cpo_save
+unlet s:cpo_save
diff --git a/ftplugin/hare.vim b/ftplugin/hare.vim
@@ -20,3 +20,5 @@ setlocal commentstring=//\ %s
" Set 'formatoptions' to break comment lines but not other lines,
" and insert the comment leader when hitting <CR> or using "o".
setlocal fo-=t fo+=croql
+
+compiler hare