Enable clangd's dot-to-arrow feature (#21142)

Closes #20815


![dot2arrow1127](https://github.com/user-attachments/assets/d825f9bf-52ae-47ee-b3a3-5f952b6e8979)

Release Notes:
- Enabled clangd's dot-to-arrow feature
This commit is contained in:
feeiyu 2024-11-28 16:43:25 +08:00 committed by GitHub
parent a4584c9d13
commit c2c968f2de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 62 additions and 17 deletions

View file

@ -30,7 +30,10 @@ use gpui::{AppContext, AsyncAppContext, Model, SharedString, Task};
pub use highlight_map::HighlightMap;
use http_client::HttpClient;
pub use language_registry::{LanguageName, LoadedLanguage};
use lsp::{CodeActionKind, LanguageServerBinary, LanguageServerBinaryOptions, LanguageServerName};
use lsp::{
CodeActionKind, InitializeParams, LanguageServerBinary, LanguageServerBinaryOptions,
LanguageServerName,
};
use parking_lot::Mutex;
use regex::Regex;
use schemars::{
@ -484,6 +487,11 @@ pub trait LspAdapter: 'static + Send + Sync {
fn language_ids(&self) -> HashMap<String, String> {
Default::default()
}
/// Support custom initialize params.
fn prepare_initialize_params(&self, original: InitializeParams) -> Result<InitializeParams> {
Ok(original)
}
}
async fn try_fetch_server_binary<L: LspAdapter + 'static + Send + Sync + ?Sized>(