mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7123e97498 |
@@ -43,7 +43,7 @@ let s:globs = {
|
||||
\ 'clojure': '{*.clj,*.boot,*.cl2,*.cljc,*.cljs,*.cljs.hl,*.cljscm,*.cljx,*.hic,*.edn,riemann.config,build.boot,profile.boot,}',
|
||||
\ 'cmake': '{*.cmake,*.cmake.in,CMakeLists.txt,}',
|
||||
\ 'coffee': '{*.coffee,*._coffee,*.cake,*.cjsx,*.iced,*.coffeekup,Cakefile,}',
|
||||
\ 'cpp': '{*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ino,*.ipp,*.re,*.tcc,*.tpp,}',
|
||||
\ 'cpp': '{*.cpp,*.c++,*.cc,*.cp,*.cxx,*.h,*.h++,*.hh,*.hpp,*.hxx,*.inc,*.inl,*.ipp,*.tcc,*.tpp,}',
|
||||
\ 'cql': '{*.cql,}',
|
||||
\ 'cryptol': '{*.cry,*.cyl,*.lcry,*.lcyl,}',
|
||||
\ 'crystal': '{*.cr,Projectfile,}',
|
||||
@@ -94,7 +94,7 @@ let s:globs = {
|
||||
\ 'haproxy': '{*.cfg,haproxy.cfg,haproxy*.c*,}',
|
||||
\ 'haskell': '{*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig,}',
|
||||
\ 'haxe': '{*.hx,*.hxsl,}',
|
||||
\ 'hcl': '{*.hcl,*.nomad,*.tf,*.tfvars,*.workflow,Appfile,}',
|
||||
\ 'hcl': '{*.hcl,*.nomad,*.workflow,Appfile,}',
|
||||
\ 'helm': '{,}',
|
||||
\ 'help': '{,}',
|
||||
\ 'hive': '{*.q,*.hql,*.ql,}',
|
||||
@@ -106,7 +106,7 @@ let s:globs = {
|
||||
\ 'ion': '{*.ion,}',
|
||||
\ 'javascript': '{*.js,*._js,*.bones,*.cjs,*.es,*.es6,*.frag,*.gs,*.jake,*.jsb,*.jscad,*.jsfl,*.jsm,*.jss,*.mjs,*.njs,*.pac,*.sjs,*.ssjs,*.xsjs,*.xsjslib,Jakefile,}',
|
||||
\ 'javascriptreact': '{*.jsx,}',
|
||||
\ 'jinja.html': '{*.jinja,*.j2,*.jinja2,*.njk,}',
|
||||
\ 'jinja.html': '{*.jinja,*.j2,*.jinja2,}',
|
||||
\ 'jq': '{*.jq,.jqrc,}',
|
||||
\ 'json': '{*.json,*.avsc,*.geojson,*.gltf,*.har,*.ice,*.JSON-tmLanguage,*.jsonl,*.mcmeta,*.tfstate,*.tfstate.backup,*.topojson,*.webapp,*.webmanifest,*.yy,*.yyp,*.jsonp,*.template,.arcconfig,.htmlhintrc,.tern-config,.tern-project,.watchmanconfig,composer.lock,mcmod.info,}',
|
||||
\ 'json5': '{*.json5,}',
|
||||
@@ -124,7 +124,7 @@ let s:globs = {
|
||||
\ 'lua': '{*.lua,*.fcgi,*.nse,*.p8,*.pd_lua,*.rbxs,*.rockspec,*.wlua,.luacheckrc,}',
|
||||
\ 'm4': '{*.m4,*.at,}',
|
||||
\ 'mako': '{*.mako,*.mao,}',
|
||||
\ 'markdown': '{*.md,*.markdown,*.mdown,*.mdwn,*.mdx,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr,}',
|
||||
\ 'markdown': '{*.md,*.markdown,*.mdown,*.mdwn,*.mkd,*.mkdn,*.mkdown,*.ronn,*.workbook,contents.lr,}',
|
||||
\ 'markdown.mdx': '{*.mdx,}',
|
||||
\ 'meson': '{meson.build,meson_options.txt,}',
|
||||
\ 'mma': '{*.mathematica,*.cdf,*.m,*.ma,*.mt,*.nb,*.nbp,*.wl,*.wlt,*.wls,}',
|
||||
@@ -157,7 +157,7 @@ let s:globs = {
|
||||
\ 'python': '{*.py,*.cgi,*.fcgi,*.gyp,*.gypi,*.lmi,*.py3,*.pyde,*.pyi,*.pyp,*.pyt,*.pyw,*.rpy,*.smk,*.spec,*.tac,*.wsgi,*.xpy,.gclient,DEPS,SConscript,SConstruct,Snakefile,wscript,}',
|
||||
\ 'qmake': '{*.pro,*.pri,}',
|
||||
\ 'qml': '{*.qml,*.qbs,}',
|
||||
\ 'r': '{*.r,*.rd,*.rsx,*.s,*.S,.Rprofile,expr-dist,}',
|
||||
\ 'r': '{*.r,*.rsx,*.s,*.S,.Rprofile,expr-dist,}',
|
||||
\ 'racket': '{*.rkt,*.rktd,*.rktl,*.scrbl,}',
|
||||
\ 'ragel': '{*.rl,}',
|
||||
\ 'raku': '{*.6pl,*.6pm,*.nqp,*.p6,*.p6l,*.p6m,*.pl,*.pl6,*.pm,*.pm6,*.t,*.rakudoc,*.rakutest,*.raku,*.rakumod,*.pod6,*.t6,}',
|
||||
@@ -167,18 +167,18 @@ let s:globs = {
|
||||
\ 'requirements': '{*.pip,*requirements.{txt,in},*require.{txt,in},constraints.{txt,in},}',
|
||||
\ 'rhelp': '{*.rd,}',
|
||||
\ 'rst': '{*.rst,*.rest,*.rest.txt,*.rst.txt,}',
|
||||
\ 'ruby': '{*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Brewfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,Rantfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb,}',
|
||||
\ 'ruby': '{*.rb,*.builder,*.eye,*.fcgi,*.gemspec,*.god,*.jbuilder,*.mspec,*.pluginspec,*.podspec,*.rabl,*.rake,*.rbi,*.rbuild,*.rbw,*.rbx,*.ru,*.ruby,*.spec,*.thor,*.watchr,*.rxml,*.rjs,*.rant,*.axlsx,*.cap,*.opal,.irbrc,.pryrc,.simplecov,Appraisals,Berksfile,Buildfile,Capfile,Dangerfile,Deliverfile,Fastfile,Gemfile,Gemfile.lock,Guardfile,Jarfile,Mavenfile,Podfile,Puppetfile,Rakefile,Snapfile,Thorfile,Vagrantfile,buildfile,Rantfile,.autotest,Cheffile,KitchenSink,Routefile,.Guardfile,.Brewfile,vagrantfile,[Rr]akefile*,*_spec.rb,}',
|
||||
\ 'rust': '{*.rs,*.rs.in,}',
|
||||
\ 'sbt.scala': '{*.sbt,}',
|
||||
\ 'scala': '{*.scala,*.kojo,*.sbt,*.sc,}',
|
||||
\ 'scala': '{*.scala,*.kojo,*.sc,}',
|
||||
\ 'scss': '{*.scss,}',
|
||||
\ 'sexplib': '{*.sexp,}',
|
||||
\ 'sh': '{*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,*.zsh,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,.zlogin,.zlogout,.zprofile,.zshenv,.zshrc,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,zlogin,zlogout,zprofile,zshenv,zshrc,}',
|
||||
\ 'sh': '{*.sh,*.bash,*.bats,*.cgi,*.command,*.env,*.fcgi,*.ksh,*.sh.in,*.tmux,*.tool,.bash_aliases,.bash_history,.bash_logout,.bash_profile,.bashrc,.cshrc,.env,.env.example,.flaskenv,.login,.profile,9fs,PKGBUILD,bash_aliases,bash_logout,bash_profile,bashrc,cshrc,gradlew,login,man,profile,}',
|
||||
\ 'slim': '{*.slim,}',
|
||||
\ 'slime': '{*.slime,}',
|
||||
\ 'smt2': '{*.smt2,*.smt,}',
|
||||
\ 'solidity': '{*.sol,}',
|
||||
\ 'sql': '{*.pgsql,*.sql,}',
|
||||
\ 'sql': '{*.pgsql,}',
|
||||
\ 'stylus': '{*.styl,*.stylus,}',
|
||||
\ 'svelte': '{*.svelte,}',
|
||||
\ 'svg': '{*.svg,}',
|
||||
@@ -204,7 +204,7 @@ let s:globs = {
|
||||
\ 'vmasm': '{*.mar,}',
|
||||
\ 'vue': '{*.vue,*.wpy,}',
|
||||
\ 'xdc': '{*.xdc,}',
|
||||
\ 'xml': '{*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.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,*.ts,*.tsx,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,}',
|
||||
\ 'xml': '{*.xml,*.adml,*.admx,*.ant,*.axml,*.builds,*.ccproj,*.ccxml,*.clixml,*.cproject,*.cscfg,*.csdef,*.csl,*.csproj,*.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,*.ui,*.urdf,*.ux,*.vbproj,*.vcxproj,*.vsixmanifest,*.vssettings,*.vstemplate,*.vxml,*.wixproj,*.workflow,*.wsdl,*.wsf,*.wxi,*.wxl,*.wxs,*.x3d,*.xacro,*.xaml,*.xib,*.xlf,*.xliff,*.xmi,*.xml.dist,*.xproj,*.xsd,*.xspec,*.xul,*.zcml,*.cdxml,.classpath,.cproject,.project,App.config,NuGet.config,Settings.StyleCop,Web.Debug.config,Web.Release.config,Web.config,packages.config,}',
|
||||
\ 'xml.twig': '{*.xml.twig,}',
|
||||
\ 'xsl': '{*.xslt,*.xsl,}',
|
||||
\ 'yaml': '{*.yml,*.mir,*.reek,*.rviz,*.sublime-syntax,*.syntax,*.yaml,*.yaml-tmlanguage,*.yaml.sed,*.yml.mysql,.clang-format,.clang-tidy,.gemrc,glide.lock,yarn.lock,fish_history,fish_read_history,}',
|
||||
|
||||
@@ -59,6 +59,230 @@ if !exists('g:python_highlight_all')
|
||||
call s:SetDefault('g:python_highlight_file_headers_as_comments', 1)
|
||||
call s:SetDefault('g:python_slow_sync', 1)
|
||||
endif
|
||||
if !has_key(s:disabled_packages, '8th')
|
||||
au! BufRead,BufNewFile *.8th
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'a65')
|
||||
au! BufRead,BufNewFile *.a65
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'aap')
|
||||
au! BufRead,BufNewFile *.aap
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'abap')
|
||||
au! BufRead,BufNewFile *.abap
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'abc')
|
||||
au! BufRead,BufNewFile *.abc
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'acpiasl')
|
||||
au! BufRead,BufNewFile *.dsl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'ada')
|
||||
au! BufRead,BufNewFile *.ada
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'aidl')
|
||||
au! BufRead,BufNewFile *.aidl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'aml')
|
||||
au! BufRead,BufNewFile *.aml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'applescript')
|
||||
au! BufRead,BufNewFile *.applescript
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'art')
|
||||
au! BufRead,BufNewFile *.art
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'asciidoc')
|
||||
au! BufRead,BufNewFile *.asciidoc
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'asn')
|
||||
au! BufRead,BufNewFile *.asn
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'ave')
|
||||
au! BufRead,BufNewFile *.ave
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'awk')
|
||||
au! BufRead,BufNewFile *.awk
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'c/c++')
|
||||
au! BufRead,BufNewFile *.c,*.cpp,*.tpp
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'cmake')
|
||||
au! BufRead,BufNewFile *.cmake
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dart')
|
||||
au! BufRead,BufNewFile *.dart
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dlang')
|
||||
au! BufRead,BufNewFile *.sdl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'dockerfile')
|
||||
au! BufRead,BufNewFile *.dockerfile
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'elm')
|
||||
au! BufRead,BufNewFile *.elm
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'git')
|
||||
au! BufRead,BufNewFile *.gitconfig
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'gnuplot')
|
||||
au! BufRead,BufNewFile *.gp,*.gnuplot
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'go')
|
||||
au! BufRead,BufNewFile *.go
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'haml')
|
||||
au! BufRead,BufNewFile *.haml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'handlebars')
|
||||
au! BufRead,BufNewFile *.hb
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'haproxy')
|
||||
au! BufRead,BufNewFile *.cfg
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'html5')
|
||||
au! BufRead,BufNewFile *.st,*.xhtml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'json')
|
||||
au! BufRead,BufNewFile *.json,*.template
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'less')
|
||||
au! BufRead,BufNewFile *.less
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'lua')
|
||||
au! BufRead,BufNewFile *.lua
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'm4')
|
||||
au! BufRead,BufNewFile *.m4
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'markdown')
|
||||
au! BufRead,BufNewFile *.markdown
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'opencl')
|
||||
au! BufRead,BufNewFile *.cl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'perl')
|
||||
au! BufRead,BufNewFile *.perl
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'php')
|
||||
au! BufRead,BufNewFile *.php
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'protobuf')
|
||||
au! BufRead,BufNewFile *.proto
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'python')
|
||||
au! BufRead,BufNewFile *.spec
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'r-lang')
|
||||
au! BufRead,BufNewFile *.r
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'raku')
|
||||
au! BufRead,BufNewFile *.pod6
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'raml')
|
||||
au! BufRead,BufNewFile *.raml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'rst')
|
||||
au! BufRead,BufNewFile *.rst
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'ruby')
|
||||
au! BufRead,BufNewFile *.ruby,*.spec
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'scala')
|
||||
au! BufRead,BufNewFile *.scala
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sbt')
|
||||
au! BufRead,BufNewFile *.sbt
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'scss')
|
||||
au! BufRead,BufNewFile *.scss
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'sh')
|
||||
au! BufRead,BufNewFile *.sh,*.tmux,*.zsh
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'svg')
|
||||
au! BufRead,BufNewFile *.svg
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'swift')
|
||||
au! BufRead,BufNewFile *.swift
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'terraform')
|
||||
au! BufRead,BufNewFile *.tf
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'twig')
|
||||
au! BufRead,BufNewFile *.twig
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'vbnet')
|
||||
au! BufRead,BufNewFile *.vb
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'vue')
|
||||
au! BufRead,BufNewFile *.vue
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'xml')
|
||||
au! BufRead,BufNewFile *.xml,*.ant,*.xsd
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'xsl')
|
||||
au! BufRead,BufNewFile *.xslt
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'yaml')
|
||||
au! BufRead,BufNewFile *.yaml
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, '8th')
|
||||
au BufNewFile,BufRead *.8th setf 8th
|
||||
endif
|
||||
@@ -240,11 +464,9 @@ if !has_key(s:disabled_packages, 'c/c++')
|
||||
au BufNewFile,BufRead *.hxx setf cpp
|
||||
au BufNewFile,BufRead *.inc setf cpp
|
||||
au BufNewFile,BufRead *.inl setf cpp
|
||||
au BufNewFile,BufRead *.ino setf cpp
|
||||
au BufNewFile,BufRead *.ipp setf cpp
|
||||
au BufNewFile,BufRead *.tcc setf cpp
|
||||
au BufNewFile,BufRead *.tpp setf cpp
|
||||
au! BufNewFile,BufRead *.re call polyglot#DetectReFiletype()
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'caddyfile')
|
||||
@@ -535,8 +757,6 @@ endif
|
||||
if !has_key(s:disabled_packages, 'hcl')
|
||||
au BufNewFile,BufRead *.hcl setf hcl
|
||||
au BufNewFile,BufRead *.nomad setf hcl
|
||||
au BufNewFile,BufRead *.tf setf hcl
|
||||
au BufNewFile,BufRead *.tfvars setf hcl
|
||||
au BufNewFile,BufRead *.workflow setf hcl
|
||||
au BufNewFile,BufRead Appfile setf hcl
|
||||
endif
|
||||
@@ -621,7 +841,6 @@ if !has_key(s:disabled_packages, 'jinja')
|
||||
au BufNewFile,BufRead *.j2 setf jinja.html
|
||||
au BufNewFile,BufRead *.jinja setf jinja.html
|
||||
au BufNewFile,BufRead *.jinja2 setf jinja.html
|
||||
au BufNewFile,BufRead *.njk setf jinja.html
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'jq')
|
||||
@@ -768,7 +987,6 @@ if !has_key(s:disabled_packages, 'markdown')
|
||||
au BufNewFile,BufRead *.md setf markdown
|
||||
au BufNewFile,BufRead *.mdown setf markdown
|
||||
au BufNewFile,BufRead *.mdwn setf markdown
|
||||
au BufNewFile,BufRead *.mdx setf markdown
|
||||
au BufNewFile,BufRead *.mkd setf markdown
|
||||
au BufNewFile,BufRead *.mkdn setf markdown
|
||||
au BufNewFile,BufRead *.mkdown setf markdown
|
||||
@@ -881,7 +1099,6 @@ endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'pgsql')
|
||||
au BufNewFile,BufRead *.pgsql let b:sql_type_override='pgsql' | set ft=sql
|
||||
au BufNewFile,BufRead *.sql let b:sql_type_override='pgsql' | set ft=sql
|
||||
endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'cql')
|
||||
@@ -1002,7 +1219,6 @@ endif
|
||||
if !has_key(s:disabled_packages, 'r-lang')
|
||||
au BufNewFile,BufRead *.S setf r
|
||||
au BufNewFile,BufRead *.r setf r
|
||||
au BufNewFile,BufRead *.rd setf r
|
||||
au BufNewFile,BufRead *.rsx setf r
|
||||
au BufNewFile,BufRead *.s setf r
|
||||
au BufNewFile,BufRead {.,}Rprofile setf r
|
||||
@@ -1093,7 +1309,6 @@ if !has_key(s:disabled_packages, 'ruby')
|
||||
au BufNewFile,BufRead {.,}simplecov setf ruby
|
||||
au BufNewFile,BufRead Appraisals setf ruby
|
||||
au BufNewFile,BufRead Berksfile setf ruby
|
||||
au BufNewFile,BufRead Brewfile setf ruby
|
||||
au BufNewFile,BufRead Buildfile setf ruby
|
||||
au BufNewFile,BufRead Capfile setf ruby
|
||||
au BufNewFile,BufRead Cheffile setf ruby
|
||||
@@ -1140,7 +1355,6 @@ endif
|
||||
|
||||
if !has_key(s:disabled_packages, 'scala')
|
||||
au BufNewFile,BufRead *.kojo setf scala
|
||||
au BufNewFile,BufRead *.sbt setf scala
|
||||
au BufNewFile,BufRead *.sc setf scala
|
||||
au BufNewFile,BufRead *.scala setf scala
|
||||
endif
|
||||
@@ -1165,7 +1379,6 @@ if !has_key(s:disabled_packages, 'sh')
|
||||
au BufNewFile,BufRead *.sh.in setf sh
|
||||
au BufNewFile,BufRead *.tmux setf sh
|
||||
au BufNewFile,BufRead *.tool setf sh
|
||||
au BufNewFile,BufRead *.zsh setf sh
|
||||
au BufNewFile,BufRead {.,}bash_aliases setf sh
|
||||
au BufNewFile,BufRead {.,}bash_history setf sh
|
||||
au BufNewFile,BufRead {.,}bash_logout setf sh
|
||||
@@ -1177,11 +1390,6 @@ if !has_key(s:disabled_packages, 'sh')
|
||||
au BufNewFile,BufRead {.,}flaskenv setf sh
|
||||
au BufNewFile,BufRead {.,}login setf sh
|
||||
au BufNewFile,BufRead {.,}profile setf sh
|
||||
au BufNewFile,BufRead {.,}zlogin setf sh
|
||||
au BufNewFile,BufRead {.,}zlogout setf sh
|
||||
au BufNewFile,BufRead {.,}zprofile setf sh
|
||||
au BufNewFile,BufRead {.,}zshenv setf sh
|
||||
au BufNewFile,BufRead {.,}zshrc setf sh
|
||||
au BufNewFile,BufRead 9fs setf sh
|
||||
au BufNewFile,BufRead PKGBUILD setf sh
|
||||
au BufNewFile,BufRead bash_aliases setf sh
|
||||
@@ -1193,11 +1401,6 @@ if !has_key(s:disabled_packages, 'sh')
|
||||
au BufNewFile,BufRead login setf sh
|
||||
au BufNewFile,BufRead man setf sh
|
||||
au BufNewFile,BufRead profile setf sh
|
||||
au BufNewFile,BufRead zlogin setf sh
|
||||
au BufNewFile,BufRead zlogout setf sh
|
||||
au BufNewFile,BufRead zprofile setf sh
|
||||
au BufNewFile,BufRead zshenv setf sh
|
||||
au BufNewFile,BufRead zshrc setf sh
|
||||
au BufNewFile,BufRead *.zsh setf zsh
|
||||
au BufNewFile,BufRead {.,}zlogin setf zsh
|
||||
au BufNewFile,BufRead {.,}zlogout setf zsh
|
||||
@@ -1416,8 +1619,6 @@ if !has_key(s:disabled_packages, 'xml')
|
||||
au BufNewFile,BufRead *.sublime-snippet setf xml
|
||||
au BufNewFile,BufRead *.targets setf xml
|
||||
au BufNewFile,BufRead *.tml setf xml
|
||||
au BufNewFile,BufRead *.ts setf xml
|
||||
au BufNewFile,BufRead *.tsx setf xml
|
||||
au BufNewFile,BufRead *.ui setf xml
|
||||
au BufNewFile,BufRead *.urdf setf xml
|
||||
au BufNewFile,BufRead *.ux setf xml
|
||||
|
||||
@@ -302,6 +302,8 @@ filetypes:
|
||||
ignored_extensions:
|
||||
# conflicts with more popular reason, remove after heuristics work
|
||||
- re
|
||||
# implemented by arduino
|
||||
- ino
|
||||
---
|
||||
name: caddyfile
|
||||
remote: isobit/vim-caddyfile
|
||||
|
||||
@@ -59,17 +59,20 @@ def load_data()
|
||||
|
||||
linguist = languages.fetch(filetype["linguist"])
|
||||
|
||||
filetype["extensions"] = (linguist["extensions"] || []).map { |e| e[1..-1] } |
|
||||
filetype.fetch("extra_extensions", []) -
|
||||
filetype.fetch("ignored_extensions", []).uniq
|
||||
filetype["extensions"] = ((
|
||||
(linguist["extensions"] || []).map { |e| e[1..-1] } |
|
||||
filetype.fetch("extra_extensions", [])
|
||||
) - filetype.fetch("ignored_extensions", [])).uniq
|
||||
|
||||
filetype["filenames"] = (linguist["filenames"] || []) |
|
||||
filetype.fetch("extra_filenames", []) -
|
||||
filetype.fetch("ignored_filenames", []).uniq
|
||||
filetype["filenames"] = ((
|
||||
(linguist["filenames"] || []) |
|
||||
filetype.fetch("extra_filenames", [])
|
||||
) - filetype.fetch("ignored_filenames", [])).uniq
|
||||
|
||||
filetype["interpreters"] = (linguist["interpreters"] || []) |
|
||||
filetype.fetch("extra_interpreters", []) -
|
||||
filetype.fetch("ignored_interpreters", []).uniq
|
||||
filetype["interpreters"] = ((
|
||||
(linguist["interpreters"] || []) |
|
||||
filetype.fetch("extra_interpreters", [])
|
||||
) - filetype.fetch("ignored_interpreters", []).uniq)
|
||||
else
|
||||
filetype["extensions"] ||= []
|
||||
filetype["filenames"] ||= []
|
||||
@@ -445,7 +448,29 @@ def generate_ftdetect(packages, heuristics)
|
||||
ambiguous_extensions = extensions
|
||||
.select { |a, b| b.uniq.size > 1 }.keys.sort
|
||||
|
||||
expected_filetypes = detect_filetypes
|
||||
expected_filetypes = detect_filetypes('tmp/**/ftdetect/*.vim')
|
||||
native_filetypes = detect_filetypes('tmp/vim/vim/runtime/filetype.vim')
|
||||
native_extensions = native_filetypes.flat_map { |k, v| v["extensions"] }
|
||||
|
||||
for package in packages
|
||||
name = package.fetch("name")
|
||||
|
||||
to_disable = []
|
||||
|
||||
for filetype in package["filetypes"]
|
||||
for extension in filetype["extensions"]
|
||||
if native_filetypes.has_key?(extension)
|
||||
to_disable << "*." + extension
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if to_disable.size > 0
|
||||
output << "if !has_key(s:disabled_packages, '#{name}')\n"
|
||||
output << " au! BufRead,BufNewFile #{to_disable.join(",")}\n"
|
||||
output << "endif\n\n"
|
||||
end
|
||||
end
|
||||
|
||||
for package in packages
|
||||
name = package.fetch("name")
|
||||
@@ -690,8 +715,8 @@ def expand_all(pattern)
|
||||
end
|
||||
end
|
||||
|
||||
def detect_filetypes
|
||||
filetypes = Dir['tmp/**/ftdetect/*.vim'].flat_map do |file|
|
||||
def detect_filetypes(glob)
|
||||
filetypes = Dir[glob].flat_map do |file|
|
||||
contents = File.read(file).gsub(/^\s*au(tocmd)?!?\s*$/, '')
|
||||
results = contents.scan(/^\s*(?:au!|au|au[^g][^ ]*) +(?:\S+)\s+(\S+)[\s\\]+([^\n]+)/)
|
||||
results = results.map do |a, b|
|
||||
|
||||
Reference in New Issue
Block a user