7
|
1 " Vim filetype plugin file.
|
30202
|
2 " Language: Lua
|
26148
|
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
|
|
4 " Previous Maintainer: Max Ischenko <mfi@ukr.net>
|
30202
|
5 " Contributor: Dorai Sitaram <ds26@gte.com>
|
30875
|
6 " C.D. MacEachern <craig.daniel.maceachern@gmail.com>
|
32294
|
7 " Tyler Miller <tmillr@proton.me>
|
|
8 " Last Change: 2023 Mar 24
|
7
|
9
|
|
10 if exists("b:did_ftplugin")
|
|
11 finish
|
|
12 endif
|
|
13 let b:did_ftplugin = 1
|
|
14
|
3224
|
15 let s:cpo_save = &cpo
|
|
16 set cpo&vim
|
|
17
|
32294
|
18 setlocal comments=:---,:--
|
30202
|
19 setlocal commentstring=--\ %s
|
26148
|
20 setlocal formatoptions-=t formatoptions+=croql
|
7
|
21
|
30202
|
22 let &l:define = '\<function\|\<local\%(\s\+function\)\='
|
|
23
|
30875
|
24 " TODO: handle init.lua
|
31200
|
25 setlocal includeexpr=tr(v:fname,'.','/')
|
7
|
26 setlocal suffixesadd=.lua
|
|
27
|
30875
|
28 let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
|
7
|
29
|
26148
|
30 if exists("loaded_matchit") && !exists("b:match_words")
|
7
|
31 let b:match_ignorecase = 0
|
|
32 let b:match_words =
|
30202
|
33 \ '\<\%(do\|function\|if\)\>:' ..
|
|
34 \ '\<\%(return\|else\|elseif\)\>:' ..
|
|
35 \ '\<end\>,' ..
|
|
36 \ '\<repeat\>:\<until\>,' ..
|
|
37 \ '\%(--\)\=\[\(=*\)\[:]\1]'
|
|
38 let b:undo_ftplugin ..= " | unlet! b:match_words b:match_ignorecase"
|
26148
|
39 endif
|
7
|
40
|
26148
|
41 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
|
30202
|
42 let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" ..
|
|
43 \ "All Files (*.*)\t*.*\n"
|
|
44 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
|
26148
|
45 endif
|
3224
|
46
|
|
47 let &cpo = s:cpo_save
|
|
48 unlet s:cpo_save
|
30202
|
49
|
|
50 " vim: nowrap sw=2 sts=2 ts=8 noet:
|