Make LspAdapter::process_diagnostics
optional
This commit is contained in:
parent
d4da5135f4
commit
8ca0127658
5 changed files with 2 additions and 9 deletions
|
@ -77,7 +77,8 @@ pub trait LspAdapter: 'static + Send + Sync {
|
|||
container_dir: PathBuf,
|
||||
) -> BoxFuture<'static, Result<PathBuf>>;
|
||||
fn cached_server_binary(&self, container_dir: PathBuf) -> BoxFuture<'static, Option<PathBuf>>;
|
||||
fn process_diagnostics(&self, diagnostics: &mut lsp::PublishDiagnosticsParams);
|
||||
|
||||
fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
|
||||
|
||||
fn label_for_completion(&self, _: &lsp::CompletionItem, _: &Language) -> Option<CodeLabel> {
|
||||
None
|
||||
|
|
|
@ -105,6 +105,4 @@ impl super::LspAdapter for CLspAdapter {
|
|||
.log_err()
|
||||
.boxed()
|
||||
}
|
||||
|
||||
fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,4 @@ impl super::LspAdapter for CppLspAdapter {
|
|||
fn cached_server_binary(&self, container_dir: PathBuf) -> BoxFuture<'static, Option<PathBuf>> {
|
||||
super::c::CLspAdapter.cached_server_binary(container_dir)
|
||||
}
|
||||
|
||||
fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
|
||||
}
|
||||
|
|
|
@ -120,8 +120,6 @@ impl LspAdapter for JsonLspAdapter {
|
|||
.boxed()
|
||||
}
|
||||
|
||||
fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
|
||||
|
||||
fn initialization_options(&self) -> Option<serde_json::Value> {
|
||||
Some(json!({
|
||||
"provideFormatter": true
|
||||
|
|
|
@ -113,8 +113,6 @@ impl LspAdapter for TypeScriptLspAdapter {
|
|||
.boxed()
|
||||
}
|
||||
|
||||
fn process_diagnostics(&self, _: &mut lsp::PublishDiagnosticsParams) {}
|
||||
|
||||
fn label_for_completion(
|
||||
&self,
|
||||
item: &lsp::CompletionItem,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue