summaryrefslogtreecommitdiffstats
path: root/ftdetect/polyglot.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2017-05-17 11:07:28 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2017-05-17 11:07:28 +0200
commitaf870100716f20ee4daef9cc527a9ecf41b54114 (patch)
tree0859464c3145682cbfc29ad08de4527dd661abf7 /ftdetect/polyglot.vim
parentef369d45a505403587ea0bae30ce6768ba51398c (diff)
downloadvim-polyglot-af870100716f20ee4daef9cc527a9ecf41b54114.tar.gz
vim-polyglot-af870100716f20ee4daef9cc527a9ecf41b54114.zip
Update
Diffstat (limited to 'ftdetect/polyglot.vim')
-rw-r--r--ftdetect/polyglot.vim33
1 files changed, 20 insertions, 13 deletions
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 <sergey@tikhomirov.io>
-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 <buffer> 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