@@ -786,8 +786,8 @@ local extension = {
786786zut = ' zimbutempl' ,
787787zsh = ' zsh' ,
788788vala = ' vala' ,
789- E = function ()
790- vim .fn [ ' dist#ft#FTe ' ]( )
789+ E = function (path , bufnr )
790+ require ( ' vim.filetype.detect ' ). e ( bufnr )
791791end ,
792792EU = function (path ,bufnr )
793793return require (' vim.filetype.detect' ).euphoria (bufnr )
@@ -804,8 +804,8 @@ local extension = {
804804EXW = function (path ,bufnr )
805805return require (' vim.filetype.detect' ).euphoria (bufnr )
806806end ,
807- PL = function ()
808- vim .fn [ ' dist#ft#FTpl ' ]( )
807+ PL = function (path , bufnr )
808+ require ( ' vim.filetype.detect ' ). pl ( bufnr )
809809end ,
810810R = function (path ,bufnr )
811811require (' vim.filetype.detect' ).r (bufnr )
@@ -816,14 +816,15 @@ local extension = {
816816bas = function (path ,bufnr )
817817require (' vim.filetype.detect' ).bas (bufnr )
818818end ,
819- bi = function ()
820- vim .fn [ ' dist#ft#FTbas ' ]( )
819+ bi = function (path , bufnr )
820+ require ( ' vim.filetype.detect ' ). bas ( bufnr )
821821end ,
822- bm = function ()
822+ bm = function (path , bufnr )
823823vim .fn [' dist#ft#FTbas' ]()
824+ require (' vim.filetype.detect' ).bas (bufnr )
824825end ,
825- bash = function ()
826- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
826+ bash = function (path , bufnr )
827+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
827828end ,
828829btm = function (path ,bufnr )
829830return require (' vim.filetype.detect' ).btm (bufnr )
@@ -834,38 +835,38 @@ local extension = {
834835ch = function (path ,bufnr )
835836return require (' vim.filetype.detect' ).change (bufnr )
836837end ,
837- com = function ()
838- vim .fn [ ' dist#ft#BindzoneCheck ' ]( ' dcl' )
838+ com = function (path , bufnr )
839+ require ( ' vim.filetype.detect ' ). bindzone ( bufnr , ' dcl' )
839840end ,
840- cpt = function ()
841- vim .fn [ ' dist#ft#FThtml ' ]( )
841+ cpt = function (path , bufnr )
842+ require ( ' vim.filetype.detect ' ). html ( bufnr )
842843end ,
843- csh = function ()
844- vim .fn [ ' dist#ft#CSH ' ]( )
844+ csh = function (path , bufnr )
845+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
845846end ,
846847d = function (path ,bufnr )
847848return require (' vim.filetype.detect' ).dtrace (bufnr )
848849end ,
849- db = function ()
850- vim .fn [ ' dist#ft#BindzoneCheck ' ]( ' ' )
850+ db = function (path , bufnr )
851+ require ( ' vim.filetype.detect ' ). bindzone ( bufnr , ' ' )
851852end ,
852- dtml = function ()
853- vim .fn [ ' dist#ft#FThtml ' ]( )
853+ dtml = function (path , bufnr )
854+ require ( ' vim.filetype.detect ' ). html ( bufnr )
854855end ,
855- e = function ()
856- vim .fn [ ' dist#ft#FTe ' ]( )
856+ e = function (path , bufnr )
857+ require ( ' vim.filetype.detect ' ). e ( bufnr )
857858end ,
858- ebuild = function ()
859- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
859+ ebuild = function (path , bufnr )
860+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
860861end ,
861- eclass = function ()
862- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
862+ eclass = function (path , bufnr )
863+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
863864end ,
864865ent = function (path ,bufnr )
865866require (' vim.filetype.detect' ).ent (bufnr )
866867end ,
867- env = function ()
868- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
868+ env = function (path , bufnr )
869+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
869870end ,
870871eu = function (path ,bufnr )
871872require (' vim.filetype.detect' ).euphoria (bufnr )
@@ -886,31 +887,31 @@ local extension = {
886887require (' vim.filetype.detect' ).frm (bufnr )
887888end ,
888889fs = function (path ,bufnr )
889- vim .fn [ ' dist#ft#FTfs ' ]( )
890+ require ( ' vim.filetype.detect ' ). fs ( bufnr )
890891end ,
891892h = function (path ,bufnr )
892893require (' vim.filetype.detect' ).header (bufnr )
893894end ,
894- htm = function ()
895- vim .fn [ ' dist#ft#FThtml ' ]( )
895+ htm = function (path , bufnr )
896+ require ( ' vim.filetype.detect ' ). html ( bufnr )
896897end ,
897- html = function ()
898- vim .fn [ ' dist#ft#FThtml ' ]( )
898+ html = function (path , bufnr )
899+ require ( ' vim.filetype.detect ' ). html ( bufnr )
899900end ,
900901i = function (path ,bufnr )
901902require (' vim.filetype.detect' ).progress_asm (bufnr )
902903end ,
903904idl = function (path ,bufnr )
904905require (' vim.filetype.detect' ).idl (bufnr )
905906end ,
906- inc = function ()
907- vim .fn [ ' dist#ft#FTinc ' ]( )
907+ inc = function (path , bufnr )
908+ require ( ' vim.filetype.detect ' ). inc ( bufnr )
908909end ,
909910inp = function (path ,bufnr )
910911require (' vim.filetype.detect' ).inp (bufnr )
911912end ,
912- ksh = function ()
913- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' ksh' )
913+ ksh = function (path , bufnr )
914+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' ksh' )
914915end ,
915916lst = function (path ,bufnr )
916917require (' vim.filetype.detect' ).asm (bufnr )
@@ -941,17 +942,17 @@ local extension = {
941942return ' diff'
942943end
943944end ,
944- pl = function ()
945- vim .fn [ ' dist#ft#FTpl ' ]( )
945+ pl = function (path , bufnr )
946+ require ( ' vim.filetype.detect ' ). pl ( bufnr )
946947end ,
947- pp = function ()
948- vim .fn [ ' dist#ft#FTpp ' ]( )
948+ pp = function (path , bufnr )
949+ require ( ' vim.filetype.detect ' ). pp ( bufnr )
949950end ,
950- pro = function ()
951- vim .fn [ ' dist#ft#ProtoCheck ' ]( ' idlang' )
951+ pro = function (path , bufnr )
952+ require ( ' vim.filetype.detect ' ). proto ( bufnr , ' idlang' )
952953end ,
953- pt = function ()
954- vim .fn [ ' dist#ft#FThtml ' ]( )
954+ pt = function (path , bufnr )
955+ require ( ' vim.filetype.detect ' ). html ( ' idlang ' )
955956end ,
956957r = function (path ,bufnr )
957958require (' vim.filetype.detect' ).r (bufnr )
@@ -968,22 +969,22 @@ local extension = {
968969scd = function (path ,bufnr )
969970require (' vim.filetype.detect' ).scd (bufnr )
970971end ,
971- sh = function ()
972- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
972+ sh = function (path , bufnr )
973+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
973974end ,
974- shtml = function ()
975- vim .fn [ ' dist#ft#FThtml ' ]( )
975+ shtml = function (path , bufnr )
976+ require ( ' vim.filetype.detect ' ). html ( bufnr )
976977end ,
977978sql = function (path ,bufnr )
978979require (' vim.filetype.detect' ).sql (bufnr )
979980end ,
980- stm = function ()
981- vim .fn [ ' dist#ft#FThtml ' ]( )
981+ stm = function (path , bufnr )
982+ require ( ' vim.filetype.detect ' ). html ( bufnr )
982983end ,
983- tcsh = function ()
984- vim .fn [ ' dist#ft#SetFileTypeShell ' ]( ' tcsh' )
984+ tcsh = function (path , bufnr )
985+ require ( ' vim.filetype.detect ' ). shell ( path , bufnr , ' tcsh' )
985986end ,
986- tex = function ()
987+ tex = function (path , bufnr )
987988vim .fn [' dist#ft#FTtex' ]()
988989end ,
989990tf = function (path ,bufnr )
@@ -1300,63 +1301,63 @@ local filename = {
13001301 [' .zcompdump' ]= ' zsh' ,
13011302 [' .zshenv' ]= ' zsh' ,
13021303 [' .zfbfmarks' ]= ' zsh' ,
1303- [' .alias' ]= function ()
1304- vim .fn [ ' dist#ft#CSH ' ]( )
1304+ [' .alias' ]= function (path , bufnr )
1305+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
13051306end ,
1306- [' .bashrc' ]= function ()
1307- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1307+ [' .bashrc' ]= function (path , bufnr )
1308+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
13081309end ,
1309- [' .cshrc' ]= function ()
1310- vim .fn [ ' dist#ft#CSH ' ]( )
1310+ [' .cshrc' ]= function (path , bufnr )
1311+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
13111312end ,
1312- [' .env' ]= function ()
1313- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
1313+ [' .env' ]= function (path , bufnr )
1314+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
13141315end ,
1315- [' .kshrc' ]= function ()
1316- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' ksh' )
1316+ [' .kshrc' ]= function (path , bufnr )
1317+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' ksh' )
13171318end ,
1318- [' .login' ]= function ()
1319- vim .fn [ ' dist#ft#CSH ' ]( )
1319+ [' .login' ]= function (path , bufnr )
1320+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
13201321end ,
1321- [' .profile' ]= function ()
1322- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
1322+ [' .profile' ]= function (path , bufnr )
1323+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
13231324end ,
1324- [' .tcshrc' ]= function ()
1325- vim .fn [ ' dist#ft#SetFileTypeShell ' ]( ' tcsh' )
1325+ [' .tcshrc' ]= function (path , bufnr )
1326+ require ( ' vim.filetype.detect ' ). shell ( path , bufnr , ' tcsh' )
13261327end ,
1327- [' /etc/profile' ]= function ()
1328- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
1328+ [' /etc/profile' ]= function (path , bufnr )
1329+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
13291330end ,
1330- APKBUILD = function ()
1331- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1331+ APKBUILD = function (path , bufnr )
1332+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
13321333end ,
1333- PKGBUILD = function ()
1334- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1334+ PKGBUILD = function (path , bufnr )
1335+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
13351336end ,
1336- [' bash.bashrc' ]= function ()
1337- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1337+ [' bash.bashrc' ]= function (path , bufnr )
1338+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
13381339end ,
1339- bashrc = function ()
1340- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1340+ bashrc = function (path , bufnr )
1341+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
13411342end ,
13421343crontab = starsetf (' crontab' ),
1343- [' csh.cshrc' ]= function ()
1344- vim .fn [ ' dist#ft#CSH ' ]( )
1344+ [' csh.cshrc' ]= function (path , bufnr )
1345+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
13451346end ,
1346- [' csh.login' ]= function ()
1347- vim .fn [ ' dist#ft#CSH ' ]( )
1347+ [' csh.login' ]= function (path , bufnr )
1348+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
13481349end ,
1349- [' csh.logout' ]= function ()
1350- vim .fn [ ' dist#ft#CSH ' ]( )
1350+ [' csh.logout' ]= function (path , bufnr )
1351+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
13511352end ,
1352- [' indent.pro' ]= function ()
1353- vim .fn [ ' dist#ft#ProtoCheck ' ]( ' indent' )
1353+ [' indent.pro' ]= function (path , bufnr )
1354+ require ( ' vim.filetype.detect ' ). proto ( bufnr , ' indent' )
13541355end ,
1355- [' tcsh.login' ]= function ()
1356- vim .fn [ ' dist#ft#SetFileTypeShell ' ]( ' tcsh' )
1356+ [' tcsh.login' ]= function (path , bufnr )
1357+ require ( ' vim.filetype.detect ' ). shell ( path , bufnr , ' tcsh' )
13571358end ,
1358- [' tcsh.tcshrc' ]= function ()
1359- vim .fn [ ' dist#ft#SetFileTypeShell ' ]( ' tcsh' )
1359+ [' tcsh.tcshrc' ]= function (path , bufnr )
1360+ require ( ' vim.filetype.detect ' ). shell ( path , bufnr , ' tcsh' )
13601361end ,
13611362-- END FILENAME
13621363}
@@ -1528,32 +1529,32 @@ local pattern = {
15281529 [' .*/etc/xdg/menus/.*%.menu' ]= ' xml' ,
15291530 [' .*Xmodmap' ]= ' xmodmap' ,
15301531 [' .*/etc/zprofile' ]= ' zsh' ,
1531- [' %.bash[_-]aliases' ]= function ()
1532- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1532+ [' %.bash[_-]aliases' ]= function (path , bufnr )
1533+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
15331534end ,
1534- [' %.bash[_-]logout' ]= function ()
1535- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1535+ [' %.bash[_-]logout' ]= function (path , bufnr )
1536+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
15361537end ,
1537- [' %.bash[_-]profile' ]= function ()
1538- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1538+ [' %.bash[_-]profile' ]= function (path , bufnr )
1539+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
15391540end ,
1540- [' %.cshrc.*' ]= function ()
1541- vim .fn [ ' dist#ft#CSH ' ]( )
1541+ [' %.cshrc.*' ]= function (path , bufnr )
1542+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
15421543end ,
15431544 [' %.gtkrc.*' ]= starsetf (' gtkrc' ),
1544- [' %.kshrc.*' ]= function ()
1545- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' ksh' )
1545+ [' %.kshrc.*' ]= function (path , bufnr )
1546+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' ksh' )
15461547end ,
1547- [' %.login.*' ]= function ()
1548- vim .fn [ ' dist#ft#CSH ' ]( )
1548+ [' %.login.*' ]= function (path , bufnr )
1549+ require ( ' vim.filetype.detect ' ). csh ( path , bufnr )
15491550end ,
15501551 [' %.neomuttrc.*' ]= starsetf (' neomuttrc' ),
1551- [' %.profile.*' ]= function ()
1552- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
1552+ [' %.profile.*' ]= function (path , bufnr )
1553+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
15531554end ,
15541555 [' %.reminders.*' ]= starsetf (' remind' ),
1555- [' %.tcshrc.*' ]= function ()
1556- vim .fn [ ' dist#ft#SetFileTypeShell ' ]( ' tcsh' )
1556+ [' %.tcshrc.*' ]= function (path , bufnr )
1557+ require ( ' vim.filetype.detect ' ). shell ( path , bufnr , ' tcsh' )
15571558end ,
15581559 [' %.zcompdump.*' ]= starsetf (' zsh' ),
15591560 [' %.zlog.*' ]= starsetf (' zsh' ),
@@ -1593,7 +1594,7 @@ local pattern = {
15931594 [' .*/etc/modprobe%..*' ]= starsetf (' modconf' ),
15941595 [' .*/etc/pam%.d/.*' ]= starsetf (' pamconf' ),
15951596 [' .*/etc/profile' ]= function ()
1596- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( vim .fn .getline (1 ))
1597+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , vim .fn .getline (1 ))
15971598end ,
15981599 [' .*/etc/proftpd/.*%.conf.*' ]= starsetf (' apachestyle' ),
15991600 [' .*/etc/proftpd/conf%..*/.*' ]= starsetf (' apachestyle' ),
@@ -1622,7 +1623,7 @@ local pattern = {
16221623 [' apache%.conf.*' ]= starsetf (' apache' ),
16231624 [' apache2%.conf.*' ]= starsetf (' apache' ),
16241625 [' bash%-fc[-%.]' ]= function ()
1625- vim .fn [ ' dist#ft#SetFileTypeSH ' ]( ' bash' )
1626+ require ( ' vim.filetype.detect ' ). sh ( path , bufnr , ' bash' )
16261627end ,
16271628 [' cabal%.project%..*' ]= starsetf (' cabalproject' ),
16281629 [' crontab%..*' ]= starsetf (' crontab' ),