" Lace (ISE)
au BufNewFile,BufRead *.ace,*.ACE setf lace
+" Larch Shared Language
+au BufNewFile,BufRead .lsl call dist#ft#FTlsl()
+
" Latexmkrc
au BufNewFile,BufRead .latexmkrc,latexmkrc setf perl
au BufNewFile,BufRead *.rockspec setf lua
" Linden Scripting Language (Second Life)
-au BufNewFile,BufRead *.lsl setf lsl
+au BufNewFile,BufRead *.lsl call dist#ft#FTlsl()
" Lynx style file (or LotusScript!)
au BufNewFile,BufRead *.lss setf lss
" Modula-3 (.m3, .i3, .mg, .ig)
au BufNewFile,BufRead *.[mi][3g] setf modula3
+" Larch/Modula-3
+au BufNewFile,BufRead *.lm3 setf modula3
+
" Monk
au BufNewFile,BufRead *.isc,*.monk,*.ssc,*.tsc setf monk
\ 'mmp': ['file.mmp'],
\ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
\ 'modula2': ['file.m2', 'file.mi'],
- \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'],
+ \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig', 'file.lm3'],
\ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'],
\ 'moo': ['file.moo'],
\ 'moonscript': ['file.moon'],
filetype off
endfunc
+func Test_lsl_file()
+ filetype on
+
+ call writefile(['looks like Linden Scripting Language'], 'Xfile.lsl', 'D')
+ split Xfile.lsl
+ call assert_equal('lsl', &filetype)
+ bwipe!
+
+ " Test dist#ft#FTlsl()
+
+ let g:filetype_lsl = 'larch'
+ split Xfile.lsl
+ call assert_equal('larch', &filetype)
+ bwipe!
+ unlet g:filetype_lsl
+
+ " Larch Shared Language
+
+ call writefile(['% larch comment'], 'Xfile.lsl')
+ split Xfile.lsl
+ call assert_equal('larch', &filetype)
+ bwipe!
+
+ call writefile(['foo: trait'], 'Xfile.lsl')
+ split Xfile.lsl
+ call assert_equal('larch', &filetype)
+ bwipe!
+
+ filetype off
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab