nexedit 0.2.2

A vim-like text editor, with simple shortcuts.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use syntect::highlighting::{HighlightState, Highlighter};
use syntect::parsing::{ParseState, ScopeStack, SyntaxReference};

#[derive(Clone, Debug, PartialEq)]
pub struct RenderState {
    pub highlight: HighlightState,
    pub parse: ParseState,
}

impl RenderState {
    pub fn new(highlighter: &Highlighter, syntax: &SyntaxReference) -> RenderState {
        RenderState {
            highlight: HighlightState::new(highlighter, ScopeStack::new()),
            parse: ParseState::new(syntax),
        }
    }
}