diff options
| author | Adam Stankiewicz <sheerun@sher.pl> | 2014-11-11 02:37:21 +0100 | 
|---|---|---|
| committer | Adam Stankiewicz <sheerun@sher.pl> | 2014-11-11 02:37:21 +0100 | 
| commit | 617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1 (patch) | |
| tree | 97fc653e0c19839490bd7aac6beeb4f5754155be /compiler | |
| parent | bd35da8e9ca0bddd95539bef0c8f4857dc4cc746 (diff) | |
| download | vim-polyglot-617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1.tar.gz vim-polyglot-617b01a5b6aa3cadb25b2ff8639e330cfc6cf3c1.zip | |
Updatev1.10.3
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/cake.vim | 2 | ||||
| -rw-r--r-- | compiler/cargo.vim | 49 | ||||
| -rw-r--r-- | compiler/coffee.vim | 2 | ||||
| -rw-r--r-- | compiler/cucumber.vim | 2 | 
4 files changed, 52 insertions, 3 deletions
| diff --git a/compiler/cake.vim b/compiler/cake.vim index 0a3c7037..b49638e7 100644 --- a/compiler/cake.vim +++ b/compiler/cake.vim @@ -1,5 +1,5 @@  " Language:    CoffeeScript -" Maintainer:  Mick Koch <kchmck@gmail.com> +" Maintainer:  Mick Koch <mick@kochm.co>  " URL:         http://github.com/kchmck/vim-coffee-script  " License:     WTFPL diff --git a/compiler/cargo.vim b/compiler/cargo.vim new file mode 100644 index 00000000..89c1cff1 --- /dev/null +++ b/compiler/cargo.vim @@ -0,0 +1,49 @@ +" Vim compiler file +" Compiler:         Cargo Compiler +" Maintainer:       Damien Radtke <damienradtke@gmail.com> +" Latest Revision:  2014 Sep 18 + +if exists("current_compiler") +  finish +endif +let current_compiler = "cargo" + +if exists(":CompilerSet") != 2 +    command -nargs=* CompilerSet setlocal <args> +endif + +CompilerSet errorformat& +CompilerSet makeprg=cargo\ $* + +" Allow a configurable global Cargo.toml name. This makes it easy to +" support variations like 'cargo.toml'. +if !exists('g:cargo_toml_name') +    let g:cargo_toml_name = 'Cargo.toml' +endif + +let s:toml_dir = fnamemodify(findfile(g:cargo_toml_name, '.;'), ':p:h').'/' + +if s:toml_dir != '' +    augroup cargo +        au! +        au QuickfixCmdPost make call s:FixPaths() +    augroup END + +    " FixPaths() is run after Cargo, and is used to change the file paths +    " to be relative to the current directory instead of Cargo.toml. +    function! s:FixPaths() +        let qflist = getqflist() +        for qf in qflist +            if !qf['valid'] +                continue +            endif +            let filename = bufname(qf['bufnr']) +            if stridx(filename, s:toml_dir) == -1 +                let filename = s:toml_dir.filename +            endif +            let qf['filename'] = simplify(s:toml_dir.bufname(qf['bufnr'])) +            call remove(qf, 'bufnr') +        endfor +        call setqflist(qflist, 'r') +    endfunction +endif diff --git a/compiler/coffee.vim b/compiler/coffee.vim index 9a91d354..5a914578 100644 --- a/compiler/coffee.vim +++ b/compiler/coffee.vim @@ -1,5 +1,5 @@  " Language:    CoffeeScript -" Maintainer:  Mick Koch <kchmck@gmail.com> +" Maintainer:  Mick Koch <mick@kochm.co>  " URL:         http://github.com/kchmck/vim-coffee-script  " License:     WTFPL diff --git a/compiler/cucumber.vim b/compiler/cucumber.vim index c020be6e..e30a089f 100644 --- a/compiler/cucumber.vim +++ b/compiler/cucumber.vim @@ -19,7 +19,7 @@ CompilerSet makeprg=cucumber  CompilerSet errorformat=        \%W%m\ (Cucumber::Undefined), -      \%E%m\ (%.%#), +      \%E%m\ (%\\S%#),        \%Z%f:%l,        \%Z%f:%l:%.%# | 
