Add brewfile support, closes #469

This commit is contained in:
Adam Stankiewicz
2020-04-25 22:15:02 +02:00
parent 24f0581a96
commit 6a15d48ed4
4 changed files with 37 additions and 1 deletions

View File

@@ -10,7 +10,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 120+ times faster** than the <!--Package Count-->148<!--/Package Count--> packages it consists of.
- It **installs and updates 120+ times faster** than the <!--Package Count-->149<!--/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`).
@@ -53,6 +53,7 @@ If you need full functionality of any plugin, please use it directly with your p
- [asciidoc](https://github.com/asciidoc/vim-asciidoc) (syntax)
- [autohotkey](https://github.com/hnamikaw/vim-autohotkey) (indent)
- [blade](https://github.com/jwalton512/vim-blade) (syntax, indent, ftplugin)
- [brewfile](https://github.com/bfontaine/Brewfile.vim) (syntax)
- [c++11](https://github.com/octol/vim-cpp-enhanced-highlight) (syntax)
- [c/c++](https://github.com/vim-jp/vim-cpp) (syntax)
- [caddyfile](https://github.com/isobit/vim-caddyfile) (syntax, indent, ftplugin)

1
build
View File

@@ -171,6 +171,7 @@ PACKS="
asciidoc:asciidoc/vim-asciidoc
autohotkey:hnamikaw/vim-autohotkey
blade:jwalton512/vim-blade
brewfile:bfontaine/Brewfile.vim
c++11:octol/vim-cpp-enhanced-highlight
c/c++:vim-jp/vim-cpp
caddyfile:isobit/vim-caddyfile

View File

@@ -206,6 +206,17 @@ autocmd BufNewFile,BufRead *.blade.php set filetype=blade
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'brewfile') == -1
augroup filetypedetect
" brewfile, from brewfile.vim in bfontaine/Brewfile.vim
" Vim filetype plugin
" Language: Brewfile
" Mantainer: Baptiste Fontaine <b@ptistefontaine.fr>
" URL: https://github.com/bfontaine/Brewfile.vim
au BufNewFile,BufRead Brewfile,.Brewfile set filetype=ruby syntax=brewfile
augroup end
endif
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1
augroup filetypedetect
" caddyfile, from caddyfile.vim in isobit/vim-caddyfile

23
syntax/brewfile.vim Normal file
View File

@@ -0,0 +1,23 @@
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'brewfile') == -1
" Vim syntax file
" Language: Brewfile
" Maintainer: Baptiste Fontaine <b@ptistefontaine.fr>
" URL: https://github.com/bfontaine/Brewfile.vim
" Last Change: 2015 Jun 18
if exists("b:current_syntax")
finish
endif
" Load ruby syntax
source $VIMRUNTIME/syntax/ruby.vim
unlet b:current_syntax
syn keyword brewfileDirective brew cask tap mas cask_args
hi def link brewfileDirective Keyword
let b:current_syntax = "brewfile"
endif