annotate runtime/ftplugin/lua.vim @ 32517:7e989714b555 v9.0.1590

patch 9.0.1590: filetype test has trailing white space Commit: https://github.com/vim/vim/commit/247caa378fc1121c99ecc594fab024691a6d7a9b Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 29 17:37:13 2023 +0100 patch 9.0.1590: filetype test has trailing white space Problem: Filetype test has trailing white space. Solution: Remove trailing white space.
author Bram Moolenaar <Bram@vim.org>
date Mon, 29 May 2023 18:45:07 +0200
parents b2e8663e6dcc
children 8ae680be2a51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file.
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
2 " Language: Lua
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
3 " Maintainer: Doug Kearns <dougkearns@gmail.com>
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
4 " Previous Maintainer: Max Ischenko <mfi@ukr.net>
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
5 " Contributor: Dorai Sitaram <ds26@gte.com>
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 30202
diff changeset
6 " C.D. MacEachern <craig.daniel.maceachern@gmail.com>
32294
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 31200
diff changeset
7 " Tyler Miller <tmillr@proton.me>
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 31200
diff changeset
8 " Last Change: 2023 Mar 24
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3224
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
15 let s:cpo_save = &cpo
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
16 set cpo&vim
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
17
32294
b2e8663e6dcc Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 31200
diff changeset
18 setlocal comments=:---,:--
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
19 setlocal commentstring=--\ %s
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
20 setlocal formatoptions-=t formatoptions+=croql
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
22 let &l:define = '\<function\|\<local\%(\s\+function\)\='
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
23
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 30202
diff changeset
24 " TODO: handle init.lua
31200
a7801222c9c5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 31139
diff changeset
25 setlocal includeexpr=tr(v:fname,'.','/')
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 setlocal suffixesadd=.lua
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
30875
3295247d97a5 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 30202
diff changeset
28 let b:undo_ftplugin = "setlocal cms< com< def< fo< inex< sua<"
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
30 if exists("loaded_matchit") && !exists("b:match_words")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 let b:match_ignorecase = 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 let b:match_words =
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
33 \ '\<\%(do\|function\|if\)\>:' ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
34 \ '\<\%(return\|else\|elseif\)\>:' ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
35 \ '\<end\>,' ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
36 \ '\<repeat\>:\<until\>,' ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
37 \ '\%(--\)\=\[\(=*\)\[:]\1]'
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
38 let b:undo_ftplugin ..= " | unlet! b:match_words b:match_ignorecase"
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
39 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
41 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
42 let b:browsefilter = "Lua Source Files (*.lua)\t*.lua\n" ..
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
43 \ "All Files (*.*)\t*.*\n"
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
44 let b:undo_ftplugin ..= " | unlet! b:browsefilter"
26148
624439a39432 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 3410
diff changeset
45 endif
3224
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
46
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
47 let &cpo = s:cpo_save
8b8ef1fed009 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 1621
diff changeset
48 unlet s:cpo_save
30202
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
49
fee9eccee266 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 26148
diff changeset
50 " vim: nowrap sw=2 sts=2 ts=8 noet: