Skip to content

Commit b916c00

Browse files
haulethjbodah
authored andcommitted
Add support for more compilers (#436)
* Add Mix compiler definition This adds support for `:compiler mix` in Vim. The `'errorformat'` is set to (partially) match output of `mix compile`. TODO: - resolve problem with setting correct paths for umbrella projects - resolve problem with multiline errors Issue #426 * Support for Credo as Vim compiler Simple support for using Credo as a Vim compiler which provide simple and easy way to lint code via `:make` command and QuickFix window. Issue #426
1 parent cfe5ee8 commit b916c00

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

compiler/credo.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if exists('current_compiler')
2+
finish
3+
endif
4+
let current_compiler = 'credo'
5+
6+
if exists(":CompilerSet") != 2
7+
command -nargs=* CompilerSet setlocal <args>
8+
endif
9+
10+
CompilerSet errorformat=%f:%l:\ %t:\ %m
11+
CompilerSet makeprg=mix\ credo\ suggest\ --format=flycheck

compiler/mix.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
if exists('current_compiler')
2+
finish
3+
endif
4+
let current_compiler = 'mix'
5+
6+
if exists(":CompilerSet") != 2
7+
command -nargs=* CompilerSet setlocal <args>
8+
endif
9+
10+
CompilerSet errorformat=%A%t%*[^:]:\ %m,%C%f:%l:\ %m,%C%f:%l,%Z
11+
CompilerSet makeprg=mix

0 commit comments

Comments
 (0)