refactor: move defaults into separate module (#25929)

Move default mappings and autocommands into a separate module and add
comments and docstrings to document each of the defaults.
This commit is contained in:
Gregory Anders
2023-11-08 09:33:37 -06:00
committed by GitHub
parent 1b0fd377ab
commit 08847a9ea1
5 changed files with 184 additions and 158 deletions

View File

@@ -413,14 +413,7 @@ int main(int argc, char **argv)
open_script_files(&params);
// Default mappings (incl. menus) & autocommands
Error err = ERROR_INIT;
Object o = NLUA_EXEC_STATIC("return vim._init_defaults()",
(Array)ARRAY_DICT_INIT, &err);
assert(!ERROR_SET(&err));
api_clear_error(&err);
assert(o.type == kObjectTypeNil);
api_free_object(o);
nlua_init_defaults();
TIME_MSG("init default mappings & autocommands");