Skip to content

Commit ecf6ac3

Browse files
committed
Improve lua parse
1 parent 292a96c commit ecf6ac3

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

denops/dpp/types.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,6 @@ export type Plugin = {
6565
lazy?: boolean;
6666
local?: boolean;
6767
lua_add?: string;
68-
lua_depends_update?: string;
69-
lua_done_update?: string;
70-
lua_post_source?: string;
71-
lua_post_update?: string;
72-
lua_pre_update?: string;
7368
lua_source?: string;
7469
merge_ftdetect?: string;
7570
merged?: boolean;

denops/dpp/utils.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,7 @@ export function parseHooksFile(
188188
hookName = match.groups.hookName;
189189
if (
190190
hookName.startsWith("hook_") ||
191-
hookName === "lua_add" ||
192-
hookName === "lua_source" ||
193-
hookName === "lua_depends_update" ||
194-
hookName.startsWith("lua_done_") ||
195-
hookName.startsWith("lua_post_")
191+
hookName.startsWith("lua_")
196192
) {
197193
dest = options;
198194
} else {
@@ -415,9 +411,8 @@ Deno.test("parseHooksFile", () => {
415411
"-- }}}",
416412
]),
417413
{
418-
ftplugin: {
419-
lua_hoge: "piyo",
420-
},
414+
lua_hoge: "piyo",
415+
ftplugin: {},
421416
},
422417
);
423418
});

0 commit comments

Comments
 (0)