mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-13 14:03:50 -05:00
Fix detection of conf files, closes #569
This commit is contained in:
@@ -102,6 +102,10 @@ if !has_key(s:disabled_packages, '8th')
|
||||
au! BufRead,BufNewFile *.8th
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'conf')
|
||||
au! BufRead,BufNewFile auto.master
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'haproxy')
|
||||
au! BufRead,BufNewFile *.cfg
|
||||
endif
|
||||
@@ -254,6 +258,10 @@ if !has_key(s:disabled_packages, 'dlang')
|
||||
au! BufRead,BufNewFile *.sdl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'yaml')
|
||||
au! BufRead,BufNewFile *.yml,*.yaml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dockerfile')
|
||||
au! BufRead,BufNewFile *.Dockerfile,Dockerfile
|
||||
endif
|
||||
@@ -270,10 +278,6 @@ if !has_key(s:disabled_packages, 'forth')
|
||||
au! BufRead,BufNewFile *.fs,*.ft,*.fth
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'glsl')
|
||||
au! BufRead,BufNewFile *.fs,*.gs,*.comp
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'fsharp')
|
||||
au! BufRead,BufNewFile *.fs
|
||||
endif
|
||||
@@ -282,6 +286,10 @@ if !has_key(s:disabled_packages, 'git')
|
||||
au! BufRead,BufNewFile .gitconfig,.gitmodules,*.git/config,*/.config/git/config,*.git/modules/*/config,git-rebase-todo
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'glsl')
|
||||
au! BufRead,BufNewFile *.fs,*.gs,*.comp
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'gnuplot')
|
||||
au! BufRead,BufNewFile *.gp,*.gpi
|
||||
endif
|
||||
@@ -482,10 +490,6 @@ if !has_key(s:disabled_packages, 'xsl')
|
||||
au! BufRead,BufNewFile *.xslt,*.xsl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'yaml')
|
||||
au! BufRead,BufNewFile *.yml,*.yaml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'help')
|
||||
au! BufRead,BufNewFile $VIMRUNTIME/doc/*.txt
|
||||
endif
|
||||
@@ -518,9 +522,13 @@ if !has_key(s:disabled_packages, '8th')
|
||||
au BufNewFile,BufRead *.8th set ft=8th
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'conf')
|
||||
au BufNewFile,BufRead *.conf,auto.master,config set ft=conf
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'haproxy')
|
||||
au BufNewFile,BufRead *.cfg,haproxy.cfg set ft=haproxy
|
||||
au BufNewFile,BufRead haproxy*.c* call s:StarSetf('haproxy')
|
||||
au BufNewFile,BufRead haproxy*.conf* call s:StarSetf('haproxy')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'a2ps')
|
||||
@@ -583,6 +591,10 @@ if !has_key(s:disabled_packages, 'ampl')
|
||||
au BufNewFile,BufRead *.run set ft=ampl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'csv')
|
||||
au BufNewFile,BufRead *.csv,*.tab,*.tsv set ft=csv
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'xml')
|
||||
au BufNewFile,BufRead *.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.cdxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.csproj.user,*.ct,*.depproj,*.dita,*.ditamap,*.ditaval,*.dll.config,*.dotsettings,*.filters,*.fsproj,*.fxml,*.glade,*.gml,*.gmx,*.grxml,*.gst,*.iml,*.ivy,*.jelly,*.jsproj,*.kml,*.launch,*.mdpolicy,*.mjml,*.mm,*.mod,*.mxml,*.natvis,*.ncl,*.ndproj,*.nproj,*.nuspec,*.odd,*.osm,*.pkgproj,*.pluginspec,*.proj,*.props,*.ps1xml,*.psc1,*.pt,*.rdf,*.resx,*.rss,*.sch,*.scxml,*.sfproj,*.shproj,*.srdf,*.storyboard,*.sublime-snippet,*.targets,*.tml,*.tpm,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wpl,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*/etc/blkid.tab,*/etc/blkid.tab.old,*/etc/xdg/menus/*.menu,*fglrxrc,{.,}classpath,{.,}cproject,{.,}project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config set ft=xml
|
||||
endif
|
||||
@@ -717,10 +729,6 @@ if !has_key(s:disabled_packages, 'crystal')
|
||||
au BufNewFile,BufRead *.cr,Projectfile set ft=crystal
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'csv')
|
||||
au BufNewFile,BufRead *.csv,*.tab,*.tsv set ft=csv
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'cucumber')
|
||||
au BufNewFile,BufRead *.feature,*.story set ft=cucumber
|
||||
endif
|
||||
@@ -745,6 +753,10 @@ if !has_key(s:disabled_packages, 'dlang')
|
||||
au BufNewFile,BufRead *.d,*.di set ft=d
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'yaml')
|
||||
au BufNewFile,BufRead *.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml,*.yml.mysql,{.,}clang-format,{.,}clang-tidy,{.,}gemrc,fish_history,fish_read_history,glide.lock,yarn.lock set ft=yaml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dockerfile')
|
||||
au BufNewFile,BufRead docker-compose*.yaml,docker-compose*.yml set ft=yaml.docker-compose
|
||||
au BufNewFile,BufRead *.Dockerfile,*.dock,*.dockerfile,Dockerfile,dockerfile set ft=Dockerfile
|
||||
@@ -793,11 +805,6 @@ if !has_key(s:disabled_packages, 'forth')
|
||||
au BufNewFile,BufRead *.ft,*.fth set ft=forth
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'glsl')
|
||||
au! BufNewFile,BufRead *.fs call polyglot#DetectFsFiletype()
|
||||
au BufNewFile,BufRead *.comp,*.fp,*.frag,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader set ft=glsl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'fsharp')
|
||||
au! BufNewFile,BufRead *.fs call polyglot#DetectFsFiletype()
|
||||
au BufNewFile,BufRead *.fsi,*.fsx set ft=fsharp
|
||||
@@ -815,6 +822,11 @@ if !has_key(s:disabled_packages, 'git')
|
||||
au BufNewFile,BufRead */{.,}gitconfig.d/* call s:StarSetf('gitconfig')
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'glsl')
|
||||
au! BufNewFile,BufRead *.fs call polyglot#DetectFsFiletype()
|
||||
au BufNewFile,BufRead *.comp,*.fp,*.frag,*.frg,*.fsh,*.fshader,*.geo,*.geom,*.glsl,*.glslf,*.glslv,*.gs,*.gshader,*.shader,*.tesc,*.tese,*.vert,*.vrx,*.vsh,*.vshader set ft=glsl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'gmpl')
|
||||
au BufNewFile,BufRead *.mod set ft=gmpl
|
||||
endif
|
||||
@@ -1333,10 +1345,6 @@ if !has_key(s:disabled_packages, 'xsl')
|
||||
au BufNewFile,BufRead *.xsl,*.xslt set ft=xsl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'yaml')
|
||||
au BufNewFile,BufRead *.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml,*.yml.mysql,{.,}clang-format,{.,}clang-tidy,{.,}gemrc,fish_history,fish_read_history,glide.lock,yarn.lock set ft=yaml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'ansible')
|
||||
au BufNewFile,BufRead handlers.*.y{a,}ml,local.y{a,}ml,main.y{a,}ml,playbook.y{a,}ml,requirements.y{a,}ml,roles.*.y{a,}ml,site.y{a,}ml,tasks.*.y{a,}ml set ft=yaml.ansible
|
||||
au BufNewFile,BufRead host_vars/* call s:StarSetf('yaml.ansible')
|
||||
|
||||
Reference in New Issue
Block a user