Skip to content
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