diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2023-12-04 13:31:57 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-04 13:31:57 -0800 |
| commit | 45fe4d11add933df76a2ea4bf52ce8904f4a778b (patch) | |
| tree | aa1066146b29f95f43153fe3948b6c165a156a15 | |
| parent | 517f0cc634b985057da5b95cf4ad659ee456a77e (diff) | |
| download | rneovim-45fe4d11add933df76a2ea4bf52ce8904f4a778b.tar.gz rneovim-45fe4d11add933df76a2ea4bf52ce8904f4a778b.tar.bz2 rneovim-45fe4d11add933df76a2ea4bf52ce8904f4a778b.zip | |
build: enable lintlua for src/ dir #26395
Problem:
Not all Lua code is checked by stylua. Automating code-style is an
important mechanism for reducing time spent on accidental
(non-essential) complexity.
Solution:
- Enable lintlua for `src/` directory.
followup to 517f0cc634b985057da5b95cf4ad659ee456a77e
| -rw-r--r-- | .styluaignore | 1 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/nvim/api/dispatch_deprecated.lua | 132 | ||||
| -rw-r--r-- | src/nvim/auevents.lua | 300 | ||||
| -rw-r--r-- | src/nvim/eval.lua | 16 | ||||
| -rw-r--r-- | src/nvim/ex_cmds.lua | 4478 | ||||
| -rw-r--r-- | src/nvim/generators/c_grammar.lua | 90 | ||||
| -rw-r--r-- | src/nvim/generators/dump_bin_array.lua | 4 | ||||
| -rw-r--r-- | src/nvim/generators/gen_api_dispatch.lua | 507 | ||||
| -rw-r--r-- | src/nvim/generators/gen_api_ui_events.lua | 110 | ||||
| -rw-r--r-- | src/nvim/generators/gen_char_blob.lua | 31 | ||||
| -rw-r--r-- | src/nvim/generators/gen_declarations.lua | 154 | ||||
| -rw-r--r-- | src/nvim/generators/gen_eval.lua | 43 | ||||
| -rw-r--r-- | src/nvim/generators/gen_events.lua | 10 | ||||
| -rw-r--r-- | src/nvim/generators/gen_ex_cmds.lua | 81 | ||||
| -rw-r--r-- | src/nvim/generators/gen_options.lua | 107 | ||||
| -rw-r--r-- | src/nvim/generators/gen_unicode_tables.lua | 33 | ||||
| -rw-r--r-- | src/nvim/generators/gen_vimvim.lua | 16 | ||||
| -rw-r--r-- | src/nvim/generators/hashy.lua | 83 | ||||
| -rw-r--r-- | src/nvim/generators/preload.lua | 4 |
20 files changed, 3225 insertions, 2979 deletions
diff --git a/.styluaignore b/.styluaignore index c720c00f7e..10184cbd04 100644 --- a/.styluaignore +++ b/.styluaignore @@ -2,5 +2,4 @@ /runtime/lua/coxpcall.lua /runtime/lua/vim/_meta /runtime/lua/vim/re.lua -/src /test diff --git a/CMakeLists.txt b/CMakeLists.txt index 2bae668e51..19950401f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -233,7 +233,7 @@ add_glob_target( TARGET lintlua-stylua COMMAND ${STYLUA_PRG} FLAGS --color=always --check --respect-ignores - GLOB_DIRS runtime/ scripts/ + GLOB_DIRS runtime/ scripts/ src/ GLOB_PAT *.lua TOUCH_STRATEGY SINGLE) @@ -260,7 +260,7 @@ add_glob_target( TARGET formatlua COMMAND ${STYLUA_PRG} FLAGS --respect-ignores - GLOB_DIRS runtime/ scripts/ + GLOB_DIRS runtime/ scripts/ src/ GLOB_PAT *.lua) add_custom_target(format) diff --git a/src/nvim/api/dispatch_deprecated.lua b/src/nvim/api/dispatch_deprecated.lua index 5650a77ac0..7a92789f79 100644 --- a/src/nvim/api/dispatch_deprecated.lua +++ b/src/nvim/api/dispatch_deprecated.lua @@ -1,69 +1,69 @@ local deprecated_aliases = { - nvim_buf_add_highlight="buffer_add_highlight", - nvim_buf_clear_highlight="buffer_clear_highlight", - nvim_buf_get_lines="buffer_get_lines", - nvim_buf_get_mark="buffer_get_mark", - nvim_buf_get_name="buffer_get_name", - nvim_buf_get_number="buffer_get_number", - nvim_buf_get_option="buffer_get_option", - nvim_buf_get_var="buffer_get_var", - nvim_buf_is_valid="buffer_is_valid", - nvim_buf_line_count="buffer_line_count", - nvim_buf_set_lines="buffer_set_lines", - nvim_buf_set_name="buffer_set_name", - nvim_buf_set_option="buffer_set_option", - nvim_call_function="vim_call_function", - nvim_command="vim_command", - nvim_command_output="vim_command_output", - nvim_del_current_line="vim_del_current_line", - nvim_err_write="vim_err_write", - nvim_err_writeln="vim_report_error", - nvim_eval="vim_eval", - nvim_feedkeys="vim_feedkeys", - nvim_get_api_info="vim_get_api_info", - nvim_get_color_by_name="vim_name_to_color", - nvim_get_color_map="vim_get_color_map", - nvim_get_current_buf="vim_get_current_buffer", - nvim_get_current_line="vim_get_current_line", - nvim_get_current_tabpage="vim_get_current_tabpage", - nvim_get_current_win="vim_get_current_window", - nvim_get_option="vim_get_option", - nvim_get_var="vim_get_var", - nvim_get_vvar="vim_get_vvar", - nvim_input="vim_input", - nvim_list_bufs="vim_get_buffers", - nvim_list_runtime_paths="vim_list_runtime_paths", - nvim_list_tabpages="vim_get_tabpages", - nvim_list_wins="vim_get_windows", - nvim_out_write="vim_out_write", - nvim_replace_termcodes="vim_replace_termcodes", - nvim_set_current_buf="vim_set_current_buffer", - nvim_set_current_dir="vim_change_directory", - nvim_set_current_line="vim_set_current_line", - nvim_set_current_tabpage="vim_set_current_tabpage", - nvim_set_current_win="vim_set_current_window", - nvim_set_option="vim_set_option", - nvim_strwidth="vim_strwidth", - nvim_subscribe="vim_subscribe", - nvim_tabpage_get_var="tabpage_get_var", - nvim_tabpage_get_win="tabpage_get_window", - nvim_tabpage_is_valid="tabpage_is_valid", - nvim_tabpage_list_wins="tabpage_get_windows", - nvim_ui_detach="ui_detach", - nvim_ui_try_resize="ui_try_resize", - nvim_unsubscribe="vim_unsubscribe", - nvim_win_get_buf="window_get_buffer", - nvim_win_get_cursor="window_get_cursor", - nvim_win_get_height="window_get_height", - nvim_win_get_option="window_get_option", - nvim_win_get_position="window_get_position", - nvim_win_get_tabpage="window_get_tabpage", - nvim_win_get_var="window_get_var", - nvim_win_get_width="window_get_width", - nvim_win_is_valid="window_is_valid", - nvim_win_set_cursor="window_set_cursor", - nvim_win_set_height="window_set_height", - nvim_win_set_option="window_set_option", - nvim_win_set_width="window_set_width", + nvim_buf_add_highlight = 'buffer_add_highlight', + nvim_buf_clear_highlight = 'buffer_clear_highlight', + nvim_buf_get_lines = 'buffer_get_lines', + nvim_buf_get_mark = 'buffer_get_mark', + nvim_buf_get_name = 'buffer_get_name', + nvim_buf_get_number = 'buffer_get_number', + nvim_buf_get_option = 'buffer_get_option', + nvim_buf_get_var = 'buffer_get_var', + nvim_buf_is_valid = 'buffer_is_valid', + nvim_buf_line_count = 'buffer_line_count', + nvim_buf_set_lines = 'buffer_set_lines', + nvim_buf_set_name = 'buffer_set_name', + nvim_buf_set_option = 'buffer_set_option', + nvim_call_function = 'vim_call_function', + nvim_command = 'vim_command', + nvim_command_output = 'vim_command_output', + nvim_del_current_line = 'vim_del_current_line', + nvim_err_write = 'vim_err_write', + nvim_err_writeln = 'vim_report_error', + nvim_eval = 'vim_eval', + nvim_feedkeys = 'vim_feedkeys', + nvim_get_api_info = 'vim_get_api_info', + nvim_get_color_by_name = 'vim_name_to_color', + nvim_get_color_map = 'vim_get_color_map', + nvim_get_current_buf = 'vim_get_current_buffer', + nvim_get_current_line = 'vim_get_current_line', + nvim_get_current_tabpage = 'vim_get_current_tabpage', + nvim_get_current_win = 'vim_get_current_window', + nvim_get_option = 'vim_get_option', + nvim_get_var = 'vim_get_var', + nvim_get_vvar = 'vim_get_vvar', + nvim_input = 'vim_input', + nvim_list_bufs = 'vim_get_buffers', + nvim_list_runtime_paths = 'vim_list_runtime_paths', + nvim_list_tabpages = 'vim_get_tabpages', + nvim_list_wins = 'vim_get_windows', + nvim_out_write = 'vim_out_write', + nvim_replace_termcodes = 'vim_replace_termcodes', + nvim_set_current_buf = 'vim_set_current_buffer', + nvim_set_current_dir = 'vim_change_directory', + nvim_set_current_line = 'vim_set_current_line', + nvim_set_current_tabpage = 'vim_set_current_tabpage', + nvim_set_current_win = 'vim_set_current_window', + nvim_set_option = 'vim_set_option', + nvim_strwidth = 'vim_strwidth', + nvim_subscribe = 'vim_subscribe', + nvim_tabpage_get_var = 'tabpage_get_var', + nvim_tabpage_get_win = 'tabpage_get_window', + nvim_tabpage_is_valid = 'tabpage_is_valid', + nvim_tabpage_list_wins = 'tabpage_get_windows', + nvim_ui_detach = 'ui_detach', + nvim_ui_try_resize = 'ui_try_resize', + nvim_unsubscribe = 'vim_unsubscribe', + nvim_win_get_buf = 'window_get_buffer', + nvim_win_get_cursor = 'window_get_cursor', + nvim_win_get_height = 'window_get_height', + nvim_win_get_option = 'window_get_option', + nvim_win_get_position = 'window_get_position', + nvim_win_get_tabpage = 'window_get_tabpage', + nvim_win_get_var = 'window_get_var', + nvim_win_get_width = 'window_get_width', + nvim_win_is_valid = 'window_is_valid', + nvim_win_set_cursor = 'window_set_cursor', + nvim_win_set_height = 'window_set_height', + nvim_win_set_option = 'window_set_option', + nvim_win_set_width = 'window_set_width', } return deprecated_aliases diff --git a/src/nvim/auevents.lua b/src/nvim/auevents.lua index 696df7c534..11d1597236 100644 --- a/src/nvim/auevents.lua +++ b/src/nvim/auevents.lua @@ -1,172 +1,172 @@ return { events = { - 'BufAdd', -- after adding a buffer to the buffer list - 'BufDelete', -- deleting a buffer from the buffer list - 'BufEnter', -- after entering a buffer - 'BufFilePost', -- after renaming a buffer - 'BufFilePre', -- before renaming a buffer - 'BufHidden', -- just after buffer becomes hidden - 'BufLeave', -- before leaving a buffer - 'BufModifiedSet', -- after the 'modified' state of a buffer changes - 'BufNew', -- after creating any buffer - 'BufNewFile', -- when creating a buffer for a new file - 'BufReadCmd', -- read buffer using command - 'BufReadPost', -- after reading a buffer - 'BufReadPre', -- before reading a buffer - 'BufUnload', -- just before unloading a buffer - 'BufWinEnter', -- after showing a buffer in a window - 'BufWinLeave', -- just after buffer removed from window - 'BufWipeout', -- just before really deleting a buffer - 'BufWriteCmd', -- write buffer using command - 'BufWritePost', -- after writing a buffer - 'BufWritePre', -- before writing a buffer - 'ChanInfo', -- info was received about channel - 'ChanOpen', -- channel was opened - 'CmdUndefined', -- command undefined - 'CmdWinEnter', -- after entering the cmdline window - 'CmdWinLeave', -- before leaving the cmdline window - 'CmdlineChanged', -- command line was modified - 'CmdlineEnter', -- after entering cmdline mode - 'CmdlineLeave', -- before leaving cmdline mode - 'ColorScheme', -- after loading a colorscheme - 'ColorSchemePre', -- before loading a colorscheme - 'CompleteChanged', -- after popup menu changed - 'CompleteDone', -- after finishing insert complete - 'CompleteDonePre', -- idem, before clearing info - 'CursorHold', -- cursor in same position for a while - 'CursorHoldI', -- idem, in Insert mode - 'CursorMoved', -- cursor was moved - 'CursorMovedI', -- cursor was moved in Insert mode - 'DiagnosticChanged', -- diagnostics in a buffer were modified - 'DiffUpdated', -- diffs have been updated - 'DirChanged', -- directory changed - 'DirChangedPre', -- directory is going to change - 'EncodingChanged', -- after changing the 'encoding' option - 'ExitPre', -- before exiting - 'FileAppendCmd', -- append to a file using command - 'FileAppendPost', -- after appending to a file - 'FileAppendPre', -- before appending to a file - 'FileChangedRO', -- before first change to read-only file - 'FileChangedShell', -- after shell command that changed file - 'FileChangedShellPost', -- after (not) reloading changed file - 'FileReadCmd', -- read from a file using command - 'FileReadPost', -- after reading a file - 'FileReadPre', -- before reading a file - 'FileType', -- new file type detected (user defined) - 'FileWriteCmd', -- write to a file using command - 'FileWritePost', -- after writing a file - 'FileWritePre', -- before writing a file - 'FilterReadPost', -- after reading from a filter - 'FilterReadPre', -- before reading from a filter - 'FilterWritePost', -- after writing to a filter - 'FilterWritePre', -- before writing to a filter - 'FocusGained', -- got the focus - 'FocusLost', -- lost the focus to another app - 'FuncUndefined', -- if calling a function which doesn't exist - 'GUIEnter', -- after starting the GUI - 'GUIFailed', -- after starting the GUI failed - 'InsertChange', -- when changing Insert/Replace mode - 'InsertCharPre', -- before inserting a char - 'InsertEnter', -- when entering Insert mode - 'InsertLeave', -- just after leaving Insert mode - 'InsertLeavePre', -- just before leaving Insert mode - 'LspAttach', -- after an LSP client attaches to a buffer - 'LspDetach', -- after an LSP client detaches from a buffer - 'LspRequest', -- after an LSP request is started, canceled, or completed - 'LspNotify', -- after an LSP notice has been sent to the server - 'LspTokenUpdate', -- after a visible LSP token is updated - 'LspProgress', -- after a LSP progress update - 'MenuPopup', -- just before popup menu is displayed - 'ModeChanged', -- after changing the mode - 'OptionSet', -- after setting any option - 'QuickFixCmdPost', -- after :make, :grep etc. - 'QuickFixCmdPre', -- before :make, :grep etc. - 'QuitPre', -- before :quit - 'RecordingEnter', -- when starting to record a macro - 'RecordingLeave', -- just before a macro stops recording - 'RemoteReply', -- upon string reception from a remote vim - 'SafeState', -- going to wait for a character - 'SearchWrapped', -- after the search wrapped around - 'SessionLoadPost', -- after loading a session file - 'ShellCmdPost', -- after ":!cmd" - 'ShellFilterPost', -- after ":1,2!cmd", ":w !cmd", ":r !cmd". - 'Signal', -- after nvim process received a signal - 'SourceCmd', -- sourcing a Vim script using command - 'SourcePost', -- after sourcing a Vim script - 'SourcePre', -- before sourcing a Vim script - 'SpellFileMissing', -- spell file missing - 'StdinReadPost', -- after reading from stdin - 'StdinReadPre', -- before reading from stdin - 'SwapExists', -- found existing swap file - 'Syntax', -- syntax selected - 'TabClosed', -- a tab has closed - 'TabEnter', -- after entering a tab page - 'TabLeave', -- before leaving a tab page - 'TabNew', -- when creating a new tab - 'TabNewEntered', -- after entering a new tab - 'TermChanged', -- after changing 'term' - 'TermClose', -- after the process exits - 'TermEnter', -- after entering Terminal mode - 'TermLeave', -- after leaving Terminal mode - 'TermOpen', -- after opening a terminal buffer - 'TermResponse', -- after setting "v:termresponse" - 'TextChanged', -- text was modified - 'TextChangedI', -- text was modified in Insert mode(no popup) - 'TextChangedP', -- text was modified in Insert mode(popup) - 'TextChangedT', -- text was modified in Terminal mode - 'TextYankPost', -- after a yank or delete was done (y, d, c) - 'UIEnter', -- after UI attaches - 'UILeave', -- after UI detaches - 'User', -- user defined autocommand - 'VimEnter', -- after starting Vim - 'VimLeave', -- before exiting Vim - 'VimLeavePre', -- before exiting Vim and writing ShaDa file - 'VimResized', -- after Vim window was resized - 'VimResume', -- after Nvim is resumed - 'VimSuspend', -- before Nvim is suspended - 'WinClosed', -- after closing a window - 'WinEnter', -- after entering a window - 'WinLeave', -- before leaving a window - 'WinNew', -- when entering a new window - 'WinResized', -- after a window was resized - 'WinScrolled', -- after a window was scrolled or resized + 'BufAdd', -- after adding a buffer to the buffer list + 'BufDelete', -- deleting a buffer from the buffer list + 'BufEnter', -- after entering a buffer + 'BufFilePost', -- after renaming a buffer + 'BufFilePre', -- before renaming a buffer + 'BufHidden', -- just after buffer becomes hidden + 'BufLeave', -- before leaving a buffer + 'BufModifiedSet', -- after the 'modified' state of a buffer changes + 'BufNew', -- after creating any buffer + 'BufNewFile', -- when creating a buffer for a new file + 'BufReadCmd', -- read buffer using command + 'BufReadPost', -- after reading a buffer + 'BufReadPre', -- before reading a buffer + 'BufUnload', -- just before unloading a buffer + 'BufWinEnter', -- after showing a buffer in a window + 'BufWinLeave', -- just after buffer removed from window + 'BufWipeout', -- just before really deleting a buffer + 'BufWriteCmd', -- write buffer using command + 'BufWritePost', -- after writing a buffer + 'BufWritePre', -- before writing a buffer + 'ChanInfo', -- info was received about channel + 'ChanOpen', -- channel was opened + 'CmdUndefined', -- command undefined + 'CmdWinEnter', -- after entering the cmdline window + 'CmdWinLeave', -- before leaving the cmdline window + 'CmdlineChanged', -- command line was modified + 'CmdlineEnter', -- after entering cmdline mode + 'CmdlineLeave', -- before leaving cmdline mode + 'ColorScheme', -- after loading a colorscheme + 'ColorSchemePre', -- before loading a colorscheme + 'CompleteChanged', -- after popup menu changed + 'CompleteDone', -- after finishing insert complete + 'CompleteDonePre', -- idem, before clearing info + 'CursorHold', -- cursor in same position for a while + 'CursorHoldI', -- idem, in Insert mode + 'CursorMoved', -- cursor was moved + 'CursorMovedI', -- cursor was moved in Insert mode + 'DiagnosticChanged', -- diagnostics in a buffer were modified + 'DiffUpdated', -- diffs have been updated + 'DirChanged', -- directory changed + 'DirChangedPre', -- directory is going to change + 'EncodingChanged', -- after changing the 'encoding' option + 'ExitPre', -- before exiting + 'FileAppendCmd', -- append to a file using command + 'FileAppendPost', -- after appending to a file + 'FileAppendPre', -- before appending to a file + 'FileChangedRO', -- before first change to read-only file + 'FileChangedShell', -- after shell command that changed file + 'FileChangedShellPost', -- after (not) reloading changed file + 'FileReadCmd', -- read from a file using command + 'FileReadPost', -- after reading a file + 'FileReadPre', -- before reading a file + 'FileType', -- new file type detected (user defined) + 'FileWriteCmd', -- write to a file using command + 'FileWritePost', -- after writing a file + 'FileWritePre', -- before writing a file + 'FilterReadPost', -- after reading from a filter + 'FilterReadPre', -- before reading from a filter + 'FilterWritePost', -- after writing to a filter + 'FilterWritePre', -- before writing to a filter + 'FocusGained', -- got the focus + 'FocusLost', -- lost the focus to another app + 'FuncUndefined', -- if calling a function which doesn't exist + 'GUIEnter', -- after starting the GUI + 'GUIFailed', -- after starting the GUI failed + 'InsertChange', -- when changing Insert/Replace mode + 'InsertCharPre', -- before inserting a char + 'InsertEnter', -- when entering Insert mode + 'InsertLeave', -- just after leaving Insert mode + 'InsertLeavePre', -- just before leaving Insert mode + 'LspAttach', -- after an LSP client attaches to a buffer + 'LspDetach', -- after an LSP client detaches from a buffer + 'LspRequest', -- after an LSP request is started, canceled, or completed + 'LspNotify', -- after an LSP notice has been sent to the server + 'LspTokenUpdate', -- after a visible LSP token is updated + 'LspProgress', -- after a LSP progress update + 'MenuPopup', -- just before popup menu is displayed + 'ModeChanged', -- after changing the mode + 'OptionSet', -- after setting any option + 'QuickFixCmdPost', -- after :make, :grep etc. + 'QuickFixCmdPre', -- before :make, :grep etc. + 'QuitPre', -- before :quit + 'RecordingEnter', -- when starting to record a macro + 'RecordingLeave', -- just before a macro stops recording + 'RemoteReply', -- upon string reception from a remote vim + 'SafeState', -- going to wait for a character + 'SearchWrapped', -- after the search wrapped around + 'SessionLoadPost', -- after loading a session file + 'ShellCmdPost', -- after ":!cmd" + 'ShellFilterPost', -- after ":1,2!cmd", ":w !cmd", ":r !cmd". + 'Signal', -- after nvim process received a signal + 'SourceCmd', -- sourcing a Vim script using command + 'SourcePost', -- after sourcing a Vim script + 'SourcePre', -- before sourcing a Vim script + 'SpellFileMissing', -- spell file missing + 'StdinReadPost', -- after reading from stdin + 'StdinReadPre', -- before reading from stdin + 'SwapExists', -- found existing swap file + 'Syntax', -- syntax selected + 'TabClosed', -- a tab has closed + 'TabEnter', -- after entering a tab page + 'TabLeave', -- before leaving a tab page + 'TabNew', -- when creating a new tab + 'TabNewEntered', -- after entering a new tab + 'TermChanged', -- after changing 'term' + 'TermClose', -- after the process exits + 'TermEnter', -- after entering Terminal mode + 'TermLeave', -- after leaving Terminal mode + 'TermOpen', -- after opening a terminal buffer + 'TermResponse', -- after setting "v:termresponse" + 'TextChanged', -- text was modified + 'TextChangedI', -- text was modified in Insert mode(no popup) + 'TextChangedP', -- text was modified in Insert mode(popup) + 'TextChangedT', -- text was modified in Terminal mode + 'TextYankPost', -- after a yank or delete was done (y, d, c) + 'UIEnter', -- after UI attaches + 'UILeave', -- after UI detaches + 'User', -- user defined autocommand + 'VimEnter', -- after starting Vim + 'VimLeave', -- before exiting Vim + 'VimLeavePre', -- before exiting Vim and writing ShaDa file + 'VimResized', -- after Vim window was resized + 'VimResume', -- after Nvim is resumed + 'VimSuspend', -- before Nvim is suspended + 'WinClosed', -- after closing a window + 'WinEnter', -- after entering a window + 'WinLeave', -- before leaving a window + 'WinNew', -- when entering a new window + 'WinResized', -- after a window was resized + 'WinScrolled', -- after a window was scrolled or resized }, aliases = { { 'BufCreate', - 'BufAdd' + 'BufAdd', }, { 'BufRead', - 'BufReadPost' + 'BufReadPost', }, { 'BufWrite', - 'BufWritePre' + 'BufWritePre', }, { 'FileEncoding', - 'EncodingChanged' + 'EncodingChanged', }, }, -- List of nvim-specific events or aliases for the purpose of generating -- syntax file nvim_specific = { - BufModifiedSet=true, - DiagnosticChanged=true, - LspAttach=true, - LspDetach=true, - LspNotify=true, - LspRequest=true, - LspProgress=true, - LspTokenUpdate=true, - RecordingEnter=true, - RecordingLeave=true, - Signal=true, - TabNewEntered=true, - TermClose=true, - TermOpen=true, - UIEnter=true, - UILeave=true, + BufModifiedSet = true, + DiagnosticChanged = true, + LspAttach = true, + LspDetach = true, + LspNotify = true, + LspRequest = true, + LspProgress = true, + LspTokenUpdate = true, + RecordingEnter = true, + RecordingLeave = true, + Signal = true, + TabNewEntered = true, + TermClose = true, + TermOpen = true, + UIEnter = true, + UILeave = true, }, } diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua index 55f4721c3a..59423808be 100644 --- a/src/nvim/eval.lua +++ b/src/nvim/eval.lua @@ -2114,7 +2114,7 @@ M.funcs = { name = 'execute', params = { { 'command', 'string|string[]' }, - { 'silent', "''|'silent'|'silent!'" } + { 'silent', "''|'silent'|'silent!'" }, }, returns = 'string', signature = 'execute({command} [, {silent}])', @@ -4519,7 +4519,7 @@ M.funcs = { name = 'getwininfo', params = { { 'winid', 'integer' } }, signature = 'getwininfo([{winid}])', - returns = 'vim.fn.getwininfo.ret.item[]' + returns = 'vim.fn.getwininfo.ret.item[]', }, getwinpos = { args = { 0, 1 }, @@ -6297,7 +6297,7 @@ M.funcs = { ]], name = 'maplist', params = {}, - signature = 'maplist([{abbr}])' + signature = 'maplist([{abbr}])', }, mapnew = { args = 2, @@ -9905,7 +9905,7 @@ M.funcs = { name = 'sign_jump', params = { { 'id', 'integer' }, { 'group', 'string' }, { 'buf', 'integer|string' } }, signature = 'sign_jump({id}, {group}, {buf})', - returns = 'integer' + returns = 'integer', }, sign_place = { args = { 4, 5 }, @@ -9968,7 +9968,7 @@ M.funcs = { { 'dict', 'vim.fn.sign_place.dict' }, }, signature = 'sign_place({id}, {group}, {name}, {buf} [, {dict}])', - returns = 'integer' + returns = 'integer', }, sign_placelist = { args = 1, @@ -10035,7 +10035,7 @@ M.funcs = { name = 'sign_placelist', params = { { 'list', 'vim.fn.sign_placelist.list.item[]' } }, signature = 'sign_placelist({list})', - returns = 'integer[]' + returns = 'integer[]', }, sign_undefine = { args = { 0, 1 }, @@ -10570,7 +10570,7 @@ M.funcs = { signature = 'stdpath({what})', }, state = { - args = {0, 1}, + args = { 0, 1 }, base = 1, desc = [=[ Return a string which contains characters indicating the @@ -12698,7 +12698,7 @@ M.funcs = { name = 'winsaveview', params = {}, signature = 'winsaveview()', - returns = 'vim.fn.winsaveview.ret' + returns = 'vim.fn.winsaveview.ret', }, winwidth = { args = 1, diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 4859a70553..551d228862 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -4,3358 +4,3358 @@ local module = {} -- Description of the values below is contained in ex_cmds_defs.h file. -- "EX_" prefix is omitted. -local RANGE = 0x001 -local BANG = 0x002 -local EXTRA = 0x004 -local XFILE = 0x008 -local NOSPC = 0x010 -local DFLALL = 0x020 -local WHOLEFOLD = 0x040 -local NEEDARG = 0x080 -local TRLBAR = 0x100 -local REGSTR = 0x200 -local COUNT = 0x400 -local NOTRLCOM = 0x800 -local ZEROR = 0x1000 -local CTRLV = 0x2000 -local CMDARG = 0x4000 -local BUFNAME = 0x8000 -local BUFUNL = 0x10000 -local ARGOPT = 0x20000 -local SBOXOK = 0x40000 -local CMDWIN = 0x80000 -local MODIFY = 0x100000 -local FLAGS = 0x200000 -local LOCK_OK = 0x1000000 -local PREVIEW = 0x8000000 -local FILES = bit.bor(XFILE, EXTRA) -local WORD1 = bit.bor(EXTRA, NOSPC) -local FILE1 = bit.bor(FILES, NOSPC) +local RANGE = 0x001 +local BANG = 0x002 +local EXTRA = 0x004 +local XFILE = 0x008 +local NOSPC = 0x010 +local DFLALL = 0x020 +local WHOLEFOLD = 0x040 +local NEEDARG = 0x080 +local TRLBAR = 0x100 +local REGSTR = 0x200 +local COUNT = 0x400 +local NOTRLCOM = 0x800 +local ZEROR = 0x1000 +local CTRLV = 0x2000 +local CMDARG = 0x4000 +local BUFNAME = 0x8000 +local BUFUNL = 0x10000 +local ARGOPT = 0x20000 +local SBOXOK = 0x40000 +local CMDWIN = 0x80000 +local MODIFY = 0x100000 +local FLAGS = 0x200000 +local LOCK_OK = 0x1000000 +local PREVIEW = 0x8000000 +local FILES = bit.bor(XFILE, EXTRA) +local WORD1 = bit.bor(EXTRA, NOSPC) +local FILE1 = bit.bor(FILES, NOSPC) module.flags = { RANGE = RANGE, DFLALL = DFLALL, - PREVIEW = PREVIEW + PREVIEW = PREVIEW, } -- The following table is described in ex_cmds_defs.h file. module.cmds = { { - command='append', - flags=bit.bor(BANG, RANGE, ZEROR, TRLBAR, CMDWIN, LOCK_OK, MODIFY), - addr_type='ADDR_LINES', - func='ex_append', + command = 'append', + flags = bit.bor(BANG, RANGE, ZEROR, TRLBAR, CMDWIN, LOCK_OK, MODIFY), + addr_type = 'ADDR_LINES', + func = 'ex_append', }, { - command='abbreviate', - flags=bit.bor(EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK), - addr_type='ADDR_NONE', - func='ex_abbreviate', + command = 'abbreviate', + flags = bit.bor(EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK), + addr_type = 'ADDR_NONE', + func = 'ex_abbreviate', }, { - command='abclear', - flags=bit.bor(EXTRA, TRLBAR, CMDWIN, LOCK_OK), - addr_type='ADDR_NONE', - func='ex_abclear', + command = 'abclear', + flags = bit.bor(EXTRA, TRLBAR, CMDWIN, LOCK_OK), + addr_type = 'ADDR_NONE', + func = 'ex_abclear', }, { - command='aboveleft', - flags=bit.bor(NEEDARG, EXTRA, NOTRLCOM), - addr_type='ADDR_NONE', - func='ex_wrongmodifier', + command = 'aboveleft', + flags = bit.bor(NEEDARG, EXTRA, NOTRLCOM), + addr_type = 'ADDR_NONE', + func = 'ex_wrongmodifier', }, { - command='all', - flags=bit.bor(BANG, RANGE, COUNT, TRLBAR), - addr_type='ADDR_OTHER', - func='ex_all', + command = 'all', + flags = bit.bor(BANG, RANGE, COUNT, TRLBAR), + addr_type = 'ADDR_OTHER', + func = 'ex_all', }, { - command='amenu', - flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK), - addr_type='ADDR_OTHER', - func='ex_menu', + command = 'amenu', + flags = bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK), + addr_type = 'ADDR_OTHER', + func = 'ex_menu', }, { - command='anoremenu', - flags=bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK), - addr_type='ADDR_OTHER', - func='ex_menu', + command = 'anoremenu', + flags = bit.bor(RANGE, ZEROR, EXTRA, TRLBAR, NOTRLCOM, CTRLV, CMDWIN, LOCK_OK), + addr_type = 'ADDR_OTHER', + func = 'ex_menu', }, { - command='args', - flags=bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR), - addr_type='ADDR_NONE', - func='ex_args', + command = 'args', + flags = bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR), + addr_type = 'ADDR_NONE', + func = 'ex_args', }, { - command='argadd', - flags=bit.bor(BANG, RANGE, ZEROR, FILES, TRLBAR), - addr_type='ADDR_ARGUMENTS', - func='ex_argadd', + command = 'argadd', + flags = bit.bor(BANG, RANGE, ZEROR, FILES, TRLBAR), + addr_type = 'ADDR_ARGUMENTS', + func = 'ex_argadd', }, { - command='argdelete', - flags=bit.bor(BANG, RANGE, FILES, TRLBAR), - addr_type='ADDR_ARGUMENTS', - func='ex_argdelete', + command = 'argdelete', + flags = bit.bor(BANG, RANGE, FILES, TRLBAR), + addr_type = 'ADDR_ARGUMENTS', + func = 'ex_argdelete', }, { - command='argdo', - flags=bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), - addr_type='ADDR_ARGUMENTS', - func='ex_listdo', + command = 'argdo', + flags = bit.bor(BANG, NEEDARG, EXTRA, NOTRLCOM, RANGE, DFLALL), + addr_type = 'ADDR_ARGUMENTS', + func = 'ex_listdo', }, { - command='argdedupe', - flags=TRLBAR, - addr_type='ADDR_NONE', - func='ex_argdedupe', + command = 'argdedupe', + flags = TRLBAR, + addr_type = 'ADDR_NONE', + func = 'ex_argdedupe', }, { - command='argedit', - flags=bit.bor(BANG, NEEDARG, RANGE, ZEROR, FILES, CMDARG, ARGOPT, TRLBAR), - addr_type='ADDR_ARGUMENTS', - func='ex_argedit', + command = 'argedit', + flags = bit.bor(BANG, NEEDARG, RANGE, ZEROR, FILES, CMDARG, ARGOPT, TRLBAR), + addr_type = 'ADDR_ARGUMENTS', + func = 'ex_argedit', }, { - command='argglobal', - flags=bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR), - addr_type='ADDR_NONE', - func='ex_args', + command = 'argglobal', + flags = bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR), + addr_type = 'ADDR_NONE', + func = 'ex_args', }, { - command='arglocal', - flags=bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR), - addr_type='ADDR_NONE', - func='ex_args', + command = 'arglocal', + flags = bit.bor(BANG, FILES, CMDARG, ARGOPT, TRLBAR), + addr_type = 'ADDR |