From b969c36b17eb87e0faa2639aca300d41407fab28 Mon Sep 17 00:00:00 2001 From: Nicolas Goudry Date: Sun, 16 Jun 2024 15:05:43 +0200 Subject: [PATCH] feat(plugins/precognition): notify state on toggle --- plugins/precognition/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/precognition/default.nix b/plugins/precognition/default.nix index e41b60b..d45ad85 100644 --- a/plugins/precognition/default.nix +++ b/plugins/precognition/default.nix @@ -18,7 +18,12 @@ { mode = "n"; key = "uc"; - action = "Precognition toggle"; + action.__raw = '' + function() + local visible = require("precognition").toggle() + vim.notify(("precognition %s"):format(visible and "on" or "off")) + end + ''; options.desc = "Toggle precognition"; } ];