Enhance/plugins (#8202)

* improve(plugins): install hooks with user options

* improve(plugin): remove todos

* improve(plugin): hook for a specific plugin

* e2e tests

* improve(ui): global search bar for the results from the custom search service
This commit is contained in:
Charlie
2023-01-05 19:30:41 +08:00
committed by GitHub
parent 1eb94092f0
commit 675811ccde
11 changed files with 112 additions and 26 deletions

View File

@@ -737,6 +737,7 @@ export class LSPluginUser
const type = `hook:${tag}:${safeSnakeCase(e)}`
const handler = args[0]
const opts = args[1]
caller[f](type, handler)
const unlisten = () => {
@@ -747,7 +748,7 @@ export class LSPluginUser
}
if (!isOff) {
that.App._installPluginHook(pid, type)
that.App._installPluginHook(pid, type, opts)
} else {
unlisten()
return