Add gradle compiler support, closes #358
This commit is contained in:
parent
ca2fbfe038
commit
1ba88cc7d8
@ -8,7 +8,7 @@ A collection of language packs for Vim.
|
||||
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
|
||||
|
||||
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
|
||||
- It **installs and updates 100+ times faster** than the <!--Package Count-->126<!--/Package Count--> packages it consists of.
|
||||
- It **installs and updates 100+ times faster** than the <!--Package Count-->127<!--/Package Count--> packages it consists of.
|
||||
- Solid syntax and indentation support (other features skipped). Only the best language packs.
|
||||
- All unnecessary files are ignored (like enormous documentation from php support).
|
||||
- No support for esoteric languages, only most popular ones (modern too, like `slim`).
|
||||
@ -79,6 +79,7 @@ If you need full functionality of any plugin, please use it directly with your p
|
||||
- [gmpl](https://github.com/maelvalais/gmpl.vim) (syntax)
|
||||
- [gnuplot](https://github.com/vim-scripts/gnuplot-syntax-highlighting) (syntax)
|
||||
- [go](https://github.com/fatih/vim-go) (syntax, compiler, indent)
|
||||
- [gradle](https://github.com/tfnico/vim-gradle) (compiler)
|
||||
- [graphql](https://github.com/jparise/vim-graphql) (syntax, indent, ftplugin)
|
||||
- [groovy-indent](https://github.com/vim-scripts/groovyindent-unix) (indent)
|
||||
- [groovy](https://github.com/vim-scripts/groovy.vim) (syntax)
|
||||
|
1
build
1
build
@ -187,6 +187,7 @@ PACKS="
|
||||
gmpl:maelvalais/gmpl.vim
|
||||
gnuplot:vim-scripts/gnuplot-syntax-highlighting
|
||||
go:fatih/vim-go:_BASIC
|
||||
gradle:tfnico/vim-gradle
|
||||
graphql:jparise/vim-graphql
|
||||
groovy:vim-scripts/groovy.vim
|
||||
groovy-indent:vim-scripts/groovyindent-unix
|
||||
|
28
compiler/gradle.vim
Normal file
28
compiler/gradle.vim
Normal file
@ -0,0 +1,28 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'gradle') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim Compiler File
|
||||
" Compiler: gradle
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "gradle"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=gradle
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%E[ant:scalac]\ %f:%l:\ error:\ %m,
|
||||
\%W[ant:scalac]\ %f:%l:\ warning:\ %m,
|
||||
\%E%.%#:compile%\\w%#Java%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%W%.%#:compile%\\w%#Java%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%E%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%W%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
|
||||
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
|
||||
\%-G%.%#
|
28
compiler/gradlew.vim
Normal file
28
compiler/gradlew.vim
Normal file
@ -0,0 +1,28 @@
|
||||
if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'gradle') != -1
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim Compiler File
|
||||
" Compiler: gradlew
|
||||
|
||||
if exists("current_compiler")
|
||||
finish
|
||||
endif
|
||||
let current_compiler = "gradlew"
|
||||
|
||||
if exists(":CompilerSet") != 2 " older Vim always used :setlocal
|
||||
command -nargs=* CompilerSet setlocal <args>
|
||||
endif
|
||||
|
||||
CompilerSet makeprg=./gradlew
|
||||
|
||||
CompilerSet errorformat=
|
||||
\%E[ant:scalac]\ %f:%l:\ error:\ %m,
|
||||
\%W[ant:scalac]\ %f:%l:\ warning:\ %m,
|
||||
\%E%.%#:compile%\\w%#Java%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%W%.%#:compile%\\w%#Java%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%E%f:%l:\ error:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%W%f:%l:\ warning:\ %m,%-Z%p^,%-C%.%#,
|
||||
\%E%f:\ %\\d%\\+:\ %m\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
|
||||
\%E%>%f:\ %\\d%\\+:\ %m,%C\ @\ line\ %l\\,\ column\ %c.,%-C%.%#,%Z%p^,
|
||||
\%-G%.%#
|
@ -427,6 +427,14 @@ unlet s:cpo_save
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gradle') == -1
|
||||
augroup filetypedetect
|
||||
" gradle, from gradle.vim in tfnico/vim-gradle
|
||||
" gradle syntax highlighting
|
||||
au BufNewFile,BufRead *.gradle set filetype=groovy
|
||||
augroup end
|
||||
endif
|
||||
|
||||
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1
|
||||
augroup filetypedetect
|
||||
" graphql, from graphql.vim in jparise/vim-graphql
|
||||
|
Loading…
Reference in New Issue
Block a user