From 6c6cffd31a257c62e3a02d2be2f1e2e2d787cb65 Mon Sep 17 00:00:00 2001 From: Asapgiri Date: Fri, 1 Mar 2024 23:50:35 +0100 Subject: [PATCH] Add Shift GG function to ignore Mason error stall --- src/nvim.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/nvim.rs b/src/nvim.rs index b7c1c55..fb35fa7 100644 --- a/src/nvim.rs +++ b/src/nvim.rs @@ -148,6 +148,7 @@ impl Nvim { nvim.ui_detach()?; let id = nvim.request("nvim_get_option", ("termguicolors",))?; + let _gg = nvim.press_shift_gg(); nvim.termguicolors = nvim.wait_for_response(id)?.as_bool().expect("expected a bool"); // get synattr of Normal @@ -199,6 +200,11 @@ impl Nvim { Ok(()) } + pub fn press_shift_gg(&mut self) -> NvimResult<()> { + self.request("vim_input", ("GG",))?; + Ok(()) + } + pub fn nvim_command(&mut self, command: &str) -> NvimResult<()> { let id = self.request("nvim_command", (command,))?; self.wait_for_response(id)?;