diff --git a/config/settings.json b/config/settings.json index 9e7ae16..85f4909 100644 --- a/config/settings.json +++ b/config/settings.json @@ -514,5 +514,9 @@ "wasm-plugin-post-load-commands": [ "load-theme \"tokyo-night-color-theme\"", "load-configured-keybindings" + ], + + "wasm-plugin-post-reload-commands": [ + "load-configured-keybindings" ] } \ No newline at end of file diff --git a/config/settings.schema.json b/config/settings.schema.json index 66b9ef3..7a5d4bb 100644 --- a/config/settings.schema.json +++ b/config/settings.schema.json @@ -300,9 +300,9 @@ } }, - "^\\+?nims-plugin-post-load-commands$": { + "^\\+?wasm-plugin-post-reload-commands$": { "type": "array", - "description": "Array of commands which are executed after loading nimscript plugins", + "description": "Array of commands which are executed after reloading wasm plugins", "items": { "type": "string" } diff --git a/src/app.nim b/src/app.nim index 21a4ce1..fa5f644 100644 --- a/src/app.nim +++ b/src/app.nim @@ -2058,6 +2058,9 @@ proc reloadPluginAsync*(self: App) {.async.} = except CatchableError: log lvlError, &"Failed to reload wasm plugins: {getCurrentExceptionMsg()}\n{getCurrentException().getStackTrace()}" + self.runConfigCommands("wasm-plugin-post-reload-commands") + self.runConfigCommands("plugin-post-reload-commands") + proc reloadConfigAsync*(self: App) {.async.} = await self.loadConfigFrom(appConfigDir) await self.loadConfigFrom(homeConfigDir)