Latest LSP 3.16 protocol
Pulls in https://github.com/gluon-lang/lsp-types/pull/186
This commit is contained in:
@@ -368,7 +368,7 @@ impl GlobalState {
|
||||
let url = file_id_to_url(&self.vfs.read().0, file_id);
|
||||
let diagnostics = self.diagnostics.diagnostics_for(file_id).cloned().collect();
|
||||
let version = from_proto::vfs_path(&url)
|
||||
.map(|path| self.mem_docs.get(&path)?.version)
|
||||
.map(|path| self.mem_docs.get(&path).map(|it| it.version))
|
||||
.unwrap_or_default();
|
||||
|
||||
self.send_notification::<lsp_types::notification::PublishDiagnostics>(
|
||||
@@ -521,7 +521,7 @@ impl GlobalState {
|
||||
let mut version = None;
|
||||
if let Ok(path) = from_proto::vfs_path(¶ms.text_document.uri) {
|
||||
match this.mem_docs.remove(&path) {
|
||||
Some(doc) => version = doc.version,
|
||||
Some(doc) => version = Some(doc.version),
|
||||
None => log::error!("orphan DidCloseTextDocument: {}", path),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user