pub struct DocumentStore { /* private fields */ }Expand description
Captures the current snapshot for every open text document.
Implementations§
Source§impl DocumentStore
impl DocumentStore
Sourcepub fn open(
&mut self,
uri: &Uri,
text: &str,
version: Option<i32>,
language_id: Option<String>,
)
pub fn open( &mut self, uri: &Uri, text: &str, version: Option<i32>, language_id: Option<String>, )
Inserts or replaces the document snapshot whenever Neovim fires textDocument/didOpen.
Sourcepub fn apply_changes(
&mut self,
uri: &Uri,
changes: &[TextDocumentContentChangeEvent],
version: Option<i32>,
)
pub fn apply_changes( &mut self, uri: &Uri, changes: &[TextDocumentContentChangeEvent], version: Option<i32>, )
Applies incremental text changes using the same ordering LSP specifies.
Sourcepub fn close(&mut self, uri: &Uri)
pub fn close(&mut self, uri: &Uri)
Drops the cached snapshot as soon as the client closes the buffer.
pub fn is_open(&self, uri: &Uri) -> bool
pub fn open_documents(&self) -> Vec<OpenDocumentSnapshot>
Trait Implementations§
Source§impl Default for DocumentStore
impl Default for DocumentStore
Source§fn default() -> DocumentStore
fn default() -> DocumentStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DocumentStore
impl RefUnwindSafe for DocumentStore
impl Send for DocumentStore
impl Sync for DocumentStore
impl Unpin for DocumentStore
impl UnwindSafe for DocumentStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more