summaryrefslogtreecommitdiffstats
path: root/after/syntax/puppet.vim
diff options
context:
space:
mode:
Diffstat (limited to 'after/syntax/puppet.vim')
-rw-r--r--after/syntax/puppet.vim28
1 files changed, 28 insertions, 0 deletions
diff --git a/after/syntax/puppet.vim b/after/syntax/puppet.vim
new file mode 100644
index 00000000..e39f48d0
--- /dev/null
+++ b/after/syntax/puppet.vim
@@ -0,0 +1,28 @@
+if polyglot#init#is_disabled(expand('<sfile>:p'), 'yard', 'after/syntax/puppet.vim')
+ finish
+endif
+
+" Puppet syntax extensions for highlighting YARD documentation.
+"
+" Author: Gabriel Filion <gabster@lelutin.ca>
+" URI: https://github.com/noprompt/vim-yardoc
+" Version: 0.0.1
+"
+" This file reuses the main yardoc syntax definitions and glues them together
+" with puppet syntax groups from vim-puppet
+
+runtime! after/syntax/yardoc_support.vim
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Yard glue to puppet
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+syn match puppetComment "\s*#.*$" contains=puppetTodo,@Spell,yardComment
+syn region puppetComment start="/\*" end="\*/" contains=puppetTodo,@Spell,yardComment extend fold keepend
+syn cluster puppetNotTop add=@yardTags,@yardDirectives,@yardTypes,@yardLists,@yardHashes
+
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+" Tacking on Yard to puppet syntax classes
+""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+hi def link yardComment puppetComment
+hi def link yardGenericTag puppetKeyword
+hi def link yardGenericDirective puppetKeyword