refactor(api): handle option dicts properly

Do not copy a lot of lua strings (dict keys) to just strequal() them
Just compare them directly to a dedicated hash function.

feat(generators): HASHY McHASHFACE
This commit is contained in:
Björn Linse
2021-08-21 13:55:12 +02:00
parent 9337fff8aa
commit 32565922ef
22 changed files with 729 additions and 536 deletions

52
src/nvim/api/keysets.lua Normal file
View File

@@ -0,0 +1,52 @@
return {
context = {
"types";
};
set_extmark = {
"id";
"end_line";
"end_col";
"hl_group";
"virt_text";
"virt_text_pos";
"virt_text_win_col";
"virt_text_hide";
"hl_eol";
"hl_mode";
"ephemeral";
"priority";
"right_gravity";
"end_right_gravity";
"virt_lines";
"virt_lines_above";
"virt_lines_leftcol";
};
keymap = {
"noremap";
"nowait";
"silent";
"script";
"expr";
"unique";
};
get_commands = {
"builtin";
};
float_config = {
"row";
"col";
"width";
"height";
"anchor";
"relative";
"win";
"bufpos";
"external";
"focusable";
"zindex";
"border";
"style";
"noautocmd";
};
}