From 14dc82fc4e6c0c08078f97a24a6c1639c1cc5113 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 14 Apr 2020 13:17:26 +0200 Subject: Update --- ftdetect/polyglot.vim | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'ftdetect') diff --git a/ftdetect/polyglot.vim b/ftdetect/polyglot.vim index ed39b7c9..5a10dfff 100644 --- a/ftdetect/polyglot.vim +++ b/ftdetect/polyglot.vim @@ -111,7 +111,7 @@ function! s:isAnsible() let filename = expand("%:t") if filepath =~ '\v/(tasks|roles|handlers)/.*\.ya?ml$' | return 1 | en if filepath =~ '\v/(group|host)_vars/' | return 1 | en - if filename =~ '\v(playbook|site|main|local)\.ya?ml$' | return 1 | en + if filename =~ '\v(playbook|site|main|local|requirements)\.ya?ml$' | return 1 | en let shebang = getline(1) if shebang =~# '^#!.*/bin/env\s\+ansible-playbook\>' | return 1 | en @@ -260,7 +260,14 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " vint: -ProhibitAutocmdWithNoGroup autocmd BufNewFile,BufReadPost *.cr setlocal filetype=crystal autocmd BufNewFile,BufReadPost Projectfile setlocal filetype=crystal -autocmd BufNewFile,BufReadPost *.ecr setlocal filetype=eruby + augroup end +endif + +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 + augroup filetypedetect + " crystal, from ecrystal.vim in rhysd/vim-crystal +" vint: -ProhibitAutocmdWithNoGroup +autocmd BufNewFile,BufReadPost *.ecr setlocal filetype=ecrystal augroup end endif @@ -290,16 +297,18 @@ endif if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 augroup filetypedetect " dart, from dart.vim in dart-lang/dart-vim-plugin -autocmd BufRead,BufNewFile *.dart set filetype=dart +augroup dart-vim-plugin-ftdetec + autocmd! + autocmd BufRead,BufNewFile *.dart set filetype=dart + autocmd BufRead * call s:DetectShebang() +augroup END function! s:DetectShebang() if did_filetype() | return | endif - if getline(1) == '#!/usr/bin/env dart' + if getline(1) ==# '#!/usr/bin/env dart' setlocal filetype=dart endif endfunction - -autocmd BufRead * call s:DetectShebang() augroup end endif @@ -522,7 +531,7 @@ endif if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 augroup filetypedetect " graphql, from graphql.vim in jparise/vim-graphql:_ALL -" Copyright (c) 2016-2019 Jon Parise +" Copyright (c) 2016-2020 Jon Parise " " Permission is hereby granted, free of charge, to any person obtaining a copy " of this software and associated documentation files (the "Software"), to -- cgit v1.2.3