skip close when linter mode is None
This commit is contained in:
parent
a6717a702e
commit
8d45345c54
@ -255,9 +255,10 @@ impl LanguageServer for Backend {
|
|||||||
|
|
||||||
async fn did_close(&self, params: DidCloseTextDocumentParams) {
|
async fn did_close(&self, params: DidCloseTextDocumentParams) {
|
||||||
// 获取诊断相关的配置信息,如果 mode 为 common,则需要清空关闭文件的诊断信息
|
// 获取诊断相关的配置信息,如果 mode 为 common,则需要清空关闭文件的诊断信息
|
||||||
let linter_mode = self.server.db.get_lsp_configuration_string_value("digital-ide.function.lsp.linter.mode").unwrap();
|
if let Some(linter_mode) = self.server.db.get_lsp_configuration_string_value("digital-ide.function.lsp.linter.mode") {
|
||||||
if linter_mode == "common" {
|
if linter_mode == "common" {
|
||||||
self.client.publish_diagnostics(params.text_document.uri, vec![], None).await;
|
self.client.publish_diagnostics(params.text_document.uri, vec![], None).await;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user