mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 17:12:40 +00:00
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:
@@ -80,14 +80,28 @@ 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 lld.line_length > 850 then
|
if not auevents.neovim_specific[au] then
|
||||||
w('\n' .. vimau_start)
|
if lld.line_length > 850 then
|
||||||
|
w('\n' .. vimau_start)
|
||||||
|
end
|
||||||
|
w(' ' .. au)
|
||||||
end
|
end
|
||||||
w(' ' .. au)
|
|
||||||
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
|
||||||
|
w('\n' .. vimau_start)
|
||||||
|
end
|
||||||
|
w(' ' .. au)
|
||||||
|
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
|
if lld.line_length > 850 then
|
||||||
w('\n' .. vimau_start)
|
w('\n' .. nvimau_start)
|
||||||
end
|
end
|
||||||
w(' ' .. au)
|
w(' ' .. au)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -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,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user