diff options
Diffstat (limited to '')
| -rw-r--r-- | autoload/polyglot/detect.vim | 75 | ||||
| -rw-r--r-- | autoload/polyglot/shebang.vim | 2 | ||||
| -rw-r--r-- | autoload/polyglot/sleuth.vim | 15 | 
3 files changed, 69 insertions, 23 deletions
| diff --git a/autoload/polyglot/detect.vim b/autoload/polyglot/detect.vim index 85b9cd6a..bdd2e48d 100644 --- a/autoload/polyglot/detect.vim +++ b/autoload/polyglot/detect.vim @@ -4,7 +4,10 @@ set cpo&vim  " DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE -func! polyglot#detect#Inp() +func! polyglot#detect#Inp(...) +  if a:0 != 1 && did_filetype() +    return +  endif    let line = getline(nextnonblank(1))    if line =~# '^\*'      set ft=abaqus | return @@ -17,14 +20,20 @@ func! polyglot#detect#Inp()    endfor  endfunc -func! polyglot#detect#Asa() +func! polyglot#detect#Asa(...) +  if a:0 != 1 && did_filetype() +    return +  endif    if exists("g:filetype_asa")      let &ft = g:filetype_asa | return    endif    set ft=aspvbs | return  endfunc -func! polyglot#detect#Asp() +func! polyglot#detect#Asp(...) +  if a:0 != 1 && did_filetype() +    return +  endif    if exists("g:filetype_asp")      let &ft = g:filetype_asp | return    endif @@ -37,7 +46,10 @@ func! polyglot#detect#Asp()    set ft=aspvbs | return  endfunc -func! polyglot#detect#H() +func! polyglot#detect#H(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 200]))      let line = getline(lnum)      if line =~# '^\s*\(@\(interface\|class\|protocol\|property\|end\|synchronised\|selector\|implementation\)\(\<\|\>\)\|#import\s\+.\+\.h[">]\)' @@ -56,7 +68,10 @@ func! polyglot#detect#H()    set ft=cpp | return  endfunc -func! polyglot#detect#M() +func! polyglot#detect#M(...) +  if a:0 != 1 && did_filetype() +    return +  endif    let saw_comment = 0    for lnum in range(1, min([line("$"), 100]))      let line = getline(lnum) @@ -85,7 +100,10 @@ func! polyglot#detect#M()    set ft=octave | return  endfunc -func! polyglot#detect#Fs() +func! polyglot#detect#Fs(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 50]))      let line = getline(lnum)      if line =~# '^\(: \|new-device\)' @@ -104,7 +122,10 @@ func! polyglot#detect#Fs()    set ft=forth | return  endfunc -func! polyglot#detect#Re() +func! polyglot#detect#Re(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 50]))      let line = getline(lnum)      if line =~# '^\s*#\%(\%(if\|ifdef\|define\|pragma\)\s\+\w\|\s*include\s\+[<"]\|template\s*<\)' @@ -114,7 +135,10 @@ func! polyglot#detect#Re()    endfor  endfunc -func! polyglot#detect#Idr() +func! polyglot#detect#Idr(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 5]))      let line = getline(lnum)      if line =~# '^\s*--.*[Ii]dris \=1' @@ -148,7 +172,10 @@ func! polyglot#detect#Idr()    set ft=idris2 | return  endfunc -func! polyglot#detect#Lidr() +func! polyglot#detect#Lidr(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 200]))      let line = getline(lnum)      if line =~# '^>\s*--.*[Ii]dris \=1' @@ -158,7 +185,10 @@ func! polyglot#detect#Lidr()    set ft=lidris2 | return  endfunc -func! polyglot#detect#Bas() +func! polyglot#detect#Bas(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 5]))      let line = getline(lnum)      if line =~? 'VB_Name\|Begin VB\.\(Form\|MDIForm\|UserControl\)' @@ -168,7 +198,10 @@ func! polyglot#detect#Bas()    set ft=basic | return  endfunc -func! polyglot#detect#Pm() +func! polyglot#detect#Pm(...) +  if a:0 != 1 && did_filetype() +    return +  endif    let line = getline(nextnonblank(1))    if line =~# 'XPM2'      set ft=xpm2 | return @@ -192,7 +225,10 @@ func! polyglot#detect#Pm()    set ft=perl | return  endfunc -func! polyglot#detect#Pl() +func! polyglot#detect#Pl(...) +  if a:0 != 1 && did_filetype() +    return +  endif    let line = getline(nextnonblank(1))    if line =~# '^[^#]*:-' || line =~# '^\s*\%(%\|/\*\)' || line =~# '\.\s*$'      set ft=prolog | return @@ -213,7 +249,10 @@ func! polyglot#detect#Pl()    set ft=perl | return  endfunc -func! polyglot#detect#T() +func! polyglot#detect#T(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 5]))      let line = getline(lnum)      if line =~# '^\.' @@ -236,7 +275,10 @@ func! polyglot#detect#T()    set ft=perl | return  endfunc -func! polyglot#detect#Tt2() +func! polyglot#detect#Tt2(...) +  if a:0 != 1 && did_filetype() +    return +  endif    for lnum in range(1, min([line("$"), 3]))      let line = getline(lnum)      if line =~? '<\%(!DOCTYPE HTML\|[%?]\|html\)' @@ -246,7 +288,10 @@ func! polyglot#detect#Tt2()    set ft=tt2 | return  endfunc -func! polyglot#detect#Html() +func! polyglot#detect#Html(...) +  if a:0 != 1 && did_filetype() +    return +  endif    let line = getline(nextnonblank(1))    if line =~# '^\(%\|<[%&].*>\)'      set ft=mason | return diff --git a/autoload/polyglot/shebang.vim b/autoload/polyglot/shebang.vim index 62eb11a2..ef6bc0ed 100644 --- a/autoload/polyglot/shebang.vim +++ b/autoload/polyglot/shebang.vim @@ -513,7 +513,6 @@ let s:interpreters = {    \ 'pdksh': 'sh',    \ 'rc': 'sh',    \ 'sh': 'sh', -  \ 'zsh': 'sh',    \ 'boolector': 'smt2',    \ 'cvc4': 'smt2',    \ 'mathsat5': 'smt2', @@ -526,6 +525,7 @@ let s:interpreters = {    \ 'z3': 'smt2',    \ 'deno': 'typescript',    \ 'ts-node': 'typescript', +  \ 'zsh': 'zsh',    \ }  " DO NOT EDIT CODE ABOVE, IT IS GENERATED WITH MAKEFILE diff --git a/autoload/polyglot/sleuth.vim b/autoload/polyglot/sleuth.vim index 1250badf..f8dc2344 100644 --- a/autoload/polyglot/sleuth.vim +++ b/autoload/polyglot/sleuth.vim @@ -1,6 +1,5 @@  let s:globs = {    \ '8th': '*.8th', -  \ 'Dockerfile': '*.dockerfile,*.dock,*.Dockerfile,Dockerfile,dockerfile,Dockerfile*',    \ 'Jenkinsfile': '*.jenkinsfile,*.Jenkinsfile,Jenkinsfile,Jenkinsfile*',    \ 'a2ps': 'a2psrc,.a2psrc',    \ 'a65': '*.a65', @@ -35,7 +34,7 @@ let s:globs = {    \ 'atlas': '*.atl,*.as',    \ 'autohotkey': '*.ahk,*.ahkl',    \ 'autoit': '*.au3', -  \ 'automake': '*.mak,*.dsp,*.mk,Makefile.am,makefile.am,GNUmakefile.am', +  \ 'automake': '[mM]akefile.am,GNUmakefile.am',    \ 'ave': '*.ave',    \ 'awk': '*.awk,*.gawk',    \ 'b': '*.mch,*.ref,*.imp', @@ -203,7 +202,7 @@ let s:globs = {    \ 'gtkrc': '.gtkrc,gtkrc,.gtkrc*,gtkrc*',    \ 'haml': '*.haml,*.haml.deface,*.hamlc,*.hamlbars',    \ 'hamster': '*.hsc,*.hsm', -  \ 'haproxy': '*.cfg,haproxy.cfg,haproxy*.conf*', +  \ 'haproxy': 'haproxy*.conf*,haproxy*.cfg*',    \ 'haskell': '*.hs,*.hs-boot,*.hsc,*.bpk,*.hsig',    \ 'haste': '*.ht',    \ 'hastepreproc': '*.htpp', @@ -305,6 +304,7 @@ let s:globs = {    \ 'mail': '*.eml,snd.\d\+,.letter,.letter.\d\+,.followup,.article,.article.\d\+,pico.\d\+,mutt{ng,}-*-\w\+,mutt[[:alnum:]_-]\\\{6\},neomutt-*-\w\+,neomutt[[:alnum:]_-]\\\{6\},ae\d\+.txt,{neo,}mutt[[:alnum:]._-]\\\{6\},reportbug-*',    \ 'mailaliases': '',    \ 'mailcap': '.mailcap,mailcap', +  \ 'make': '*.mak,*.dsp,*.mk,*[mM]akefile',    \ 'mako': '*.mako,*.mao',    \ 'mallard': '*.page',    \ 'manconf': 'man.config', @@ -374,7 +374,7 @@ let s:globs = {    \ 'pamconf': '',    \ 'pamenv': 'pam_env.conf,.pam_environment',    \ 'papp': '*.papp,*.pxml,*.pxsl', -  \ 'pascal': '*.pas,*.dpr', +  \ 'pascal': '*.pas,*.pp,*.dpr,*.lpr',    \ 'passwd': '',    \ 'pccts': '*.g',    \ 'pcmk': '*.pcmk', @@ -455,7 +455,7 @@ let s:globs = {    \ 'sas': '*.sas',    \ 'sass': '*.sass',    \ 'sather': '*.sa', -  \ 'sbt.scala': '*.sbt', +  \ 'sbt': '*.sbt',    \ 'scala': '*.scala,*.kojo,*.sc',    \ 'scheme': '*.scm,*.ss,*.rkt',    \ 'scilab': '*.sci,*.sce', @@ -469,7 +469,7 @@ let s:globs = {    \ 'services': '',    \ 'setserial': '',    \ 'sexplib': '*.sexp', -  \ '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,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',    \ 'sieve': '*.siv,*.sieve',    \ 'sil': '*.sil',    \ 'simula': '*.sim', @@ -536,7 +536,7 @@ let s:globs = {    \ 'textile': '*.textile',    \ 'tf': '*.tf,.tfrc,tfrc',    \ 'thrift': '*.thrift', -  \ 'tidy': '.tidyrc,tidyrc', +  \ 'tidy': '.tidyrc,tidyrc,tidy.conf',    \ 'tilde': '*.t.html',    \ 'tli': '*.tli',    \ 'tmux': '.tmux*.conf', @@ -594,6 +594,7 @@ let s:globs = {    \ 'wvdial': 'wvdial.conf,.wvdialrc',    \ 'xdc': '*.xdc',    \ 'xdefaults': '*.ad,.Xdefaults,.Xpdefaults,.Xresources,xdm-config,Xresources*', +  \ 'xf86conf': 'XF86Config-4*,XF86Config*,xorg.conf,xorg.conf-4',    \ 'xhtml': '*.xhtml,*.xht',    \ 'xinetd': '',    \ 'xmath': '*.msc,*.msf', | 
