syntax: List NeoVim-specific autocmd events

Note: list was copied from master (7a6bf3f418). 
I did not add more events there.
This commit is contained in:
ZyX
2015-07-26 21:28:32 +03:00
parent f2b4894c93
commit 853ba34103
2 changed files with 27 additions and 5 deletions

View File

@@ -80,17 +80,31 @@ local vimau_start = 'syn keyword vimAutoEvent contained '
w('\n\n' .. vimau_start) w('\n\n' .. vimau_start)
for _, au in ipairs(auevents.events) do for _, au in ipairs(auevents.events) do
if not auevents.neovim_specific[au] then
if lld.line_length > 850 then if lld.line_length > 850 then
w('\n' .. vimau_start) w('\n' .. vimau_start)
end end
w(' ' .. au) w(' ' .. au)
end end
end
for au, _ in pairs(auevents.aliases) do for au, _ in pairs(auevents.aliases) do
if not auevents.neovim_specific[au] then
if lld.line_length > 850 then if lld.line_length > 850 then
w('\n' .. vimau_start) w('\n' .. vimau_start)
end end
w(' ' .. au) w(' ' .. au)
end end
end
local nvimau_start = 'syn keyword nvimAutoEvent contained '
w('\n\n' .. nvimau_start)
for au, _ in pairs(auevents.neovim_specific) do
if lld.line_length > 850 then
w('\n' .. nvimau_start)
end
w(' ' .. au)
end
w('\n\nsyn case match') w('\n\nsyn case match')
local vimfun_start = 'syn keyword vimFuncName contained ' local vimfun_start = 'syn keyword vimFuncName contained '

View File

@@ -94,5 +94,13 @@ return {
BufRead = 'BufReadPost', BufRead = 'BufReadPost',
BufWrite = 'BufWritePre', BufWrite = 'BufWritePre',
FileEncoding = 'EncodingChanged', FileEncoding = 'EncodingChanged',
} },
-- List of neovim-specific events or aliases for the purpose of generating
-- syntax file
neovim_specific = {
TabNew=true,
TabNewEntered=true,
TabClosed=true,
TermEnter=true,
},
} }