diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS index 6d51dea175..cd965f7674 100644 --- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -80,6 +80,7 @@ runtime/compiler/jjs.vim @dkearns runtime/compiler/jq.vim @vito-c runtime/compiler/jshint.vim @dkearns runtime/compiler/jsonlint.vim @dkearns +runtime/compiler/just.vim @Alarcritty runtime/compiler/make.vim @Konfekt runtime/compiler/mypy.vim @Konfekt runtime/compiler/pandoc.vim @Konfekt diff --git a/runtime/compiler/just.vim b/runtime/compiler/just.vim new file mode 100644 index 0000000000..9dd7dfda36 --- /dev/null +++ b/runtime/compiler/just.vim @@ -0,0 +1,23 @@ +" Vim compiler file +" Compiler: Just +" Maintainer: Alarcritty +" Last Change: 2026 Mar 20 + +if exists("current_compiler") + finish +endif +let current_compiler = "just" + +let s:cpo_save = &cpo +set cpo-=C + +CompilerSet makeprg=just + +CompilerSet errorformat= + \%Eerror:\ %m, + \%C%\\s%#——▶\ %f:%l:%c, + \%-C%.%#, + \%-G%.%# + +let &cpo = s:cpo_save +unlet s:cpo_save diff --git a/src/testdir/test_compiler.vim b/src/testdir/test_compiler.vim index d28349a70c..20cae98944 100644 --- a/src/testdir/test_compiler.vim +++ b/src/testdir/test_compiler.vim @@ -734,4 +734,35 @@ func Test_compiler_spotbugs_properties() let &shellslash = save_shellslash endfunc +func Test_compiler_just() + CheckFeature quickfix + + compiler just + call assert_equal('just', b:current_compiler) + call assert_equal('just', &makeprg) + let verbose_efm = execute('verbose set efm') + call assert_match('Last set from .*[/\\]compiler[/\\]just.vim ', verbose_efm) + + " Test that the errorformat can parse just error output + let lines =<< trim END + error: Variable `name` not defined + ——▶ justfile:2:15 + │ + 2 │ echo {{name}} + │ ^^^^ + END + call writefile(lines, 'Xjusterr.txt') + cgetfile Xjusterr.txt + let l = getqflist() + call assert_equal(1, len(l)) + call assert_equal('E', l[0].type) + call assert_equal('Variable `name` not defined', l[0].text) + call assert_equal(2, l[0].lnum) + call assert_equal(15, l[0].col) + + call setqflist([]) + call delete('Xjusterr.txt') + compiler make +endfunc + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index f16dd8d62e..5b2396b3cd 100644 --- a/src/version.c +++ b/src/version.c @@ -734,6 +734,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 225, /**/ 224, /**/