From af870100716f20ee4daef9cc527a9ecf41b54114 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 17 May 2017 11:07:28 +0200 Subject: Update --- ftdetect/polyglot.vim | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) (limited to 'ftdetect') diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index f4bd7e95..7f1f385f 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -165,8 +165,6 @@ au BufRead,BufNewFile *.ex,*.exs call s:setf('elixir') au BufRead,BufNewFile *.eex call s:setf('eelixir') au BufRead,BufNewFile * call s:DetectElixir() -au FileType elixir,eelixir setl sw=2 sts=2 et iskeyword+=!,? - function! s:setf(filetype) abort let &filetype = a:filetype endfunction @@ -283,7 +281,9 @@ augroup filetypedetect " Language: OpenGL Shading Language " Maintainer: Sergey Tikhomirov -autocmd! BufNewFile,BufRead *.glsl,*.geom,*.vert,*.frag,*.gsh,*.vsh,*.fsh,*.vs,*.fs,*.gs,*.tcs,*.tes,*.tesc,*.tese,*.comp set filetype=glsl +" Extensions supported by Khronos reference compiler +" https://github.com/KhronosGroup/glslang +autocmd! BufNewFile,BufRead *.vert,*.tesc,*.tese,*.geom,*.frag,*.comp set filetype=glsl " vim:set sts=2 sw=2 : augroup END @@ -376,10 +376,16 @@ augroup END augroup filetypedetect " javascript:pangloss/vim-javascript:_JAVASCRIPT -au BufNewFile,BufRead *.js setf javascript -au BufNewFile,BufRead *.jsm setf javascript -au BufNewFile,BufRead Jakefile setf javascript -au BufNewFile,BufRead *.es6 setf javascript +au BufNewFile,BufRead *.{js,jsm,es,es6},Jakefile setf javascript + +fun! s:SourceFlowSyntax() + if !exists('javascript_plugin_flow') && !exists('b:flow_active') && + \ search('\v\C%^\_s*%(//\s*|/\*[ \t\n*]*)\@flow>','nw') + runtime extras/flow.vim + let b:flow_active = 1 + endif +endfun +au FileType javascript au BufRead,BufWritePost call s:SourceFlowSyntax() fun! s:SelectJavascript() if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>' @@ -616,11 +622,6 @@ augroup END augroup filetypedetect " plantuml:aklt/plantuml-syntax -" Vim ftdetect file -" Language: PlantUML -" Maintainer: Aaron C. Meadows < language name at shadowguarddev dot com> -" Version: 0.1 - if did_filetype() finish endif @@ -975,6 +976,12 @@ augroup END augroup filetypedetect " twig:lumiliet/vim-twig + +if !exists('g:vim_twig_filetype_detected') && has("autocmd") + au BufNewFile,BufRead *.twig set filetype=html.twig + au BufNewFile,BufRead *.html.twig set filetype=html.twig + au BufNewFile,BufRead *.xml.twig set filetype=xml.twig +endif augroup END augroup filetypedetect @@ -1002,7 +1009,7 @@ augroup END augroup filetypedetect " vue:posva/vim-vue -au BufNewFile,BufRead *.vue setf vue.html.javascript.css +au BufNewFile,BufRead *.vue setf vue augroup END augroup filetypedetect -- cgit v1.2.3