summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rwxr-xr-xbuild1
-rw-r--r--ftdetect/polyglot.vim9
-rw-r--r--indent/Jenkinsfile.vim5
-rw-r--r--syntax/Jenkinsfile.vim27
5 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4397cfad..bb1239ee 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,7 @@ Most importantly, vim-polyglot contains all runtime syntax files from upstream [
- [i3](https://github.com/PotatoesMaster/i3-vim-syntax) (syntax, ftplugin)
- [jasmine](https://github.com/glanotte/vim-jasmine) (syntax)
- [javascript](https://github.com/pangloss/vim-javascript) (syntax, indent, compiler, ftplugin, extras)
+- [jenkins](https://github.com/martinda/Jenkinsfile-vim-syntax) (syntax, indent)
- [json](https://github.com/elzr/vim-json) (syntax, indent, ftplugin)
- [jst](https://github.com/briancollins/vim-jst) (syntax, indent)
- [jsx](https://github.com/mxw/vim-jsx) (after)
diff --git a/build b/build
index ee0e4674..376c194a 100755
--- a/build
+++ b/build
@@ -151,6 +151,7 @@ PACKS="
i3:PotatoesMaster/i3-vim-syntax
jasmine:glanotte/vim-jasmine
javascript:pangloss/vim-javascript:_JAVASCRIPT
+ jenkins:martinda/Jenkinsfile-vim-syntax
json:elzr/vim-json
jst:briancollins/vim-jst
jsx:mxw/vim-jsx:_ALL
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim
index 56e1d6a6..6c8553e2 100644
--- a/ftdetect/polyglot.vim
+++ b/ftdetect/polyglot.vim
@@ -428,6 +428,15 @@ au BufNewFile,BufRead * call s:SelectJavascript()
augroup END
augroup filetypedetect
+" jenkins:martinda/Jenkinsfile-vim-syntax
+" Jenkinsfile
+autocmd BufRead,BufNewFile Jenkinsfile set ft=Jenkinsfile
+autocmd BufRead,BufNewFile Jenkinsfile* setf Jenkinsfile
+autocmd BufRead,BufNewFile *.jenkinsfile set ft=Jenkinsfile
+autocmd BufRead,BufNewFile *.jenkinsfile setf Jenkinsfile
+augroup END
+
+augroup filetypedetect
" json:elzr/vim-json
autocmd BufNewFile,BufRead *.json setlocal filetype=json
autocmd BufNewFile,BufRead *.jsonp setlocal filetype=json
diff --git a/indent/Jenkinsfile.vim b/indent/Jenkinsfile.vim
new file mode 100644
index 00000000..07fdbf3b
--- /dev/null
+++ b/indent/Jenkinsfile.vim
@@ -0,0 +1,5 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
+
+runtime indent/groovy.vim
+
+endif
diff --git a/syntax/Jenkinsfile.vim b/syntax/Jenkinsfile.vim
new file mode 100644
index 00000000..6639b862
--- /dev/null
+++ b/syntax/Jenkinsfile.vim
@@ -0,0 +1,27 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jenkins') == -1
+
+runtime syntax/groovy.vim
+syn keyword jenkinsfileBuiltInVariable currentBuild
+
+syn keyword jenkinsfileCoreStep checkout
+syn keyword jenkinsfileCoreStep node
+syn keyword jenkinsfileCoreStep scm
+syn keyword jenkinsfileCoreStep sh
+syn keyword jenkinsfileCoreStep stage
+syn keyword jenkinsfileCoreStep step
+syn keyword jenkinsfileCoreStep tool
+
+syn keyword jenkinsfilePluginStep docker
+syn keyword jenkinsfilePluginStep emailext
+syn keyword jenkinsfilePluginStep exwsAllocate
+syn keyword jenkinsfilePluginStep exws
+syn keyword jenkinsfilePluginStep httpRequest
+syn keyword jenkinsfilePluginStep junit
+
+hi link jenkinsfileCoreStep Function
+hi link jenkinsfilePluginStep Include
+hi link jenkinsfileBuiltInVariable Identifier
+
+let b:current_syntax = "Jenkinsfile"
+
+endif