From f961bf045e64b6ab2d3106274b7c4da0c055e05b Mon Sep 17 00:00:00 2001 From: daa Date: Tue, 7 Mar 2017 13:44:28 +0300 Subject: [PATCH] Add ginit.vim support --- README.md | 2 +- src/nvim.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7e71de8..162adbd 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ GTK ui for neovim written in rust using gtk-rs bindings. ## Font settings -To setup font call: +To setup font add next line to *ginit.vim* ``` call rpcnotify(1, 'Gui', 'Font', 'DejaVu Sans Mono 12') ``` diff --git a/src/nvim.rs b/src/nvim.rs index 031257d..6740864 100644 --- a/src/nvim.rs +++ b/src/nvim.rs @@ -1,4 +1,4 @@ -use neovim_lib::{Neovim, Session, Value, Integer}; +use neovim_lib::{Neovim, NeovimApi, Session, Value, Integer}; use std::io::{Result, Error, ErrorKind}; use std::result; use std::collections::HashMap; @@ -78,6 +78,7 @@ pub fn initialize(ui: &mut Ui) -> Result<()> { nvim.session.start_event_loop_cb(move |m, p| nvim_cb(m, p)); nvim.ui_attach(80, 24, true).map_err(|e| Error::new(ErrorKind::Other, e))?; + nvim.command("runtime! ginit.vim").map_err(|e| Error::new(ErrorKind::Other, e))?; Ok(()) }