skip close when linter mode is None
This commit is contained in:
parent
a6717a702e
commit
8d45345c54
@ -255,11 +255,12 @@ impl LanguageServer for Backend {
|
||||
|
||||
async fn did_close(&self, params: DidCloseTextDocumentParams) {
|
||||
// 获取诊断相关的配置信息,如果 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" {
|
||||
self.client.publish_diagnostics(params.text_document.uri, vec![], None).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async fn did_change(&self, params: DidChangeTextDocumentParams) {
|
||||
// // 如果文件太大则显示错误
|
||||
|
Loading…
x
Reference in New Issue
Block a user