From 386a6d2f531527f271999e6753c97f934bc4ce31 Mon Sep 17 00:00:00 2001 From: halvarsu Date: Tue, 3 Oct 2023 21:14:26 +0100 Subject: [PATCH] Add nvim command to toggle automatic output --- rplugin/python3/magma/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rplugin/python3/magma/__init__.py b/rplugin/python3/magma/__init__.py index 1376a5f..7e9f1c7 100644 --- a/rplugin/python3/magma/__init__.py +++ b/rplugin/python3/magma/__init__.py @@ -332,6 +332,13 @@ def command_show_output(self) -> None: magma.should_open_display_window = True self._update_interface() + @pynvim.command("MagmaToggleAutomaticOutput", sync=True) # type: ignore + @nvimui # type: ignore + def command_toggle_output(self) -> None: + self.options.automatically_open_output = ( + not self.options.automatically_open_output + ) + @pynvim.command("MagmaSave", nargs="?", sync=True) # type: ignore @nvimui # type: ignore def command_save(self, args: List[str]) -> None: