Add DocumentData to represent in-memory document with LSP info

This commit is contained in:
kjeremy
2020-07-24 09:01:48 -04:00
parent 0e5095d3ca
commit 48da2d4c16
4 changed files with 26 additions and 7 deletions

View File

@@ -0,0 +1,16 @@
//! In-memory document information.
/// Information about a document that the Language Client
// knows about.
// Its lifetime is driven by the textDocument/didOpen and textDocument/didClose
// client notifications.
#[derive(Debug, Clone)]
pub(crate) struct DocumentData {
pub version: Option<i64>,
}
impl DocumentData {
pub fn new(version: i64) -> Self {
DocumentData { version: Some(version) }
}
}