Add moonscript support

This commit is contained in:
Adam Stankiewicz
2018-12-26 20:15:18 +01:00
parent e99f88ff00
commit 0d5f661cfd
6 changed files with 692 additions and 1 deletions

View File

@@ -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