Add ginit.vim support

This commit is contained in:
daa 2017-03-07 13:44:28 +03:00
parent 7f2e5835e4
commit f961bf045e
2 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,7 @@
GTK ui for neovim written in rust using gtk-rs bindings. GTK ui for neovim written in rust using gtk-rs bindings.
## Font settings ## Font settings
To setup font call: To setup font add next line to *ginit.vim*
``` ```
call rpcnotify(1, 'Gui', 'Font', 'DejaVu Sans Mono 12') call rpcnotify(1, 'Gui', 'Font', 'DejaVu Sans Mono 12')
``` ```

View File

@ -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::io::{Result, Error, ErrorKind};
use std::result; use std::result;
use std::collections::HashMap; 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.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.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(()) Ok(())
} }