Skip to content

Add Shift GG function to ignore Mason error stall #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/nvim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)?;
Expand Down