diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2018-07-08 15:16:28 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2018-07-08 15:16:28 +0200 |
commit | 055f7710b65dfa2df52fc0b5be2486ae36ac5751 (patch) | |
tree | 0b6c36a330e8c0c4e37ad521773d28b6c52ad3ec /ftdetect | |
parent | 33f610feb73ce782cf41a7d9a377541991c692b5 (diff) | |
download | vim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.tar.gz vim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.zip |
Update dependencies
Diffstat (limited to 'ftdetect')
-rw-r--r-- | ftdetect/polyglot.vim | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index 0a4d36d3..580946ff 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -442,23 +442,17 @@ endif if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == -1 augroup filetypedetect " javascript, from javascript.vim in pangloss/vim-javascript:_JAVASCRIPT -au BufNewFile,BufRead *.{js,mjs,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\>' set ft=javascript endif endfun -au BufNewFile,BufRead * call s:SelectJavascript() + +augroup javascript_syntax_detection + autocmd! + autocmd BufNewFile,BufRead *.{js,mjs,jsm,es,es6},Jakefile setfiletype javascript + autocmd BufNewFile,BufRead * call s:SelectJavascript() +augroup END augroup end endif @@ -951,6 +945,9 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 augroup filetypedetect " rust, from rust.vim in rust-lang/rust.vim au BufRead,BufNewFile *.rs set filetype=rust +au BufRead,BufNewFile Cargo.toml if &filetype == "" | set filetype=cfg | endif + +" vim: set et sw=4 sts=4 ts=8: augroup end endif |