diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2018-12-26 20:15:18 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2018-12-26 20:15:18 +0100 |
commit | 0d5f661cfda484860fca89fb4701797cd56e6833 (patch) | |
tree | 9a7a46a186da5bd99f9928c53d735c6c7f397061 /ftdetect | |
parent | e99f88ff0089ba78346143eaffaa7c8bf728dca2 (diff) | |
download | vim-polyglot-0d5f661cfda484860fca89fb4701797cd56e6833.tar.gz vim-polyglot-0d5f661cfda484860fca89fb4701797cd56e6833.zip |
Add moonscript support
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index a63014d8..5eaa9325 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -650,6 +650,27 @@ au BufRead,BufNewFile *.{md,mdown,mkd,mkdn,markdown,mdwn}.{des3,des,bf,bfa,aes,i augroup end endif +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1 + augroup filetypedetect + " moonscript, from moon.vim in leafo/moonscript-vim +" Language: MoonScript +" Maintainer: leafo <leafot@gmail.com> +" Based On: CoffeeScript by Mick Koch <kchmck@gmail.com> +" URL: http://github.com/leafo/moonscript-vim +" License: WTFPL + +autocmd BufNewFile,BufRead *.moon set filetype=moon + +function! s:DetectMoon() + if getline(1) =~ '^#!.*\<moon\>' + set filetype=moon + endif +endfunction + +autocmd BufNewFile,BufRead * call s:DetectMoon() + augroup end +endif + if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1 augroup filetypedetect " nginx, from nginx.vim in chr4/nginx.vim |