Struct zed2::languages::CachedLspAdapter
source · pub struct CachedLspAdapter {
pub name: LanguageServerName,
pub short_name: &'static str,
pub initialization_options: Option<Value>,
pub disk_based_diagnostic_sources: Vec<String, Global>,
pub disk_based_diagnostics_progress_token: Option<String>,
pub language_ids: HashMap<String, String, RandomState>,
pub adapter: Arc<dyn LspAdapter, Global>,
pub reinstall_attempt_count: AtomicU64,
}
Expand description
Represents a Language Server, with certain cached sync properties.
Uses LspAdapter
under the hood, but calls all ‘static’ methods
once at startup, and caches the results.
Fields§
§name: LanguageServerName
§short_name: &'static str
§initialization_options: Option<Value>
§disk_based_diagnostic_sources: Vec<String, Global>
§disk_based_diagnostics_progress_token: Option<String>
§language_ids: HashMap<String, String, RandomState>
§adapter: Arc<dyn LspAdapter, Global>
§reinstall_attempt_count: AtomicU64
Implementations§
source§impl CachedLspAdapter
impl CachedLspAdapter
pub async fn new( adapter: Arc<dyn LspAdapter, Global> ) -> impl Future<Output = Arc<CachedLspAdapter, Global>>
pub async fn fetch_latest_server_version( &self, delegate: &dyn LspAdapterDelegate ) -> impl Future<Output = Result<Box<dyn Any + Send, Global>, Error>>
pub fn will_fetch_server( &self, delegate: &Arc<dyn LspAdapterDelegate, Global>, cx: &mut AsyncAppContext ) -> Option<Task<Result<(), Error>>>
pub fn will_start_server( &self, delegate: &Arc<dyn LspAdapterDelegate, Global>, cx: &mut AsyncAppContext ) -> Option<Task<Result<(), Error>>>
pub async fn fetch_server_binary( &self, version: Box<dyn Any + Send, Global>, container_dir: PathBuf, delegate: &dyn LspAdapterDelegate ) -> impl Future<Output = Result<LanguageServerBinary, Error>>
pub async fn cached_server_binary( &self, container_dir: PathBuf, delegate: &dyn LspAdapterDelegate ) -> impl Future<Output = Option<LanguageServerBinary>>
pub fn can_be_reinstalled(&self) -> bool
pub async fn installation_test_binary( &self, container_dir: PathBuf ) -> impl Future<Output = Option<LanguageServerBinary>>
pub fn code_action_kinds(&self) -> Option<Vec<CodeActionKind, Global>>
pub fn workspace_configuration( &self, cx: &mut AppContext ) -> Pin<Box<dyn Future<Output = Value> + Send, Global>>
pub fn process_diagnostics(&self, params: &mut PublishDiagnosticsParams)
pub async fn process_completion( &self, completion_item: &mut CompletionItem ) -> impl Future<Output = ()>
pub async fn label_for_completion( &self, completion_item: &CompletionItem, language: &Arc<Language, Global> ) -> impl Future<Output = Option<CodeLabel>>
pub async fn label_for_symbol( &self, name: &str, kind: SymbolKind, language: &Arc<Language, Global> ) -> impl Future<Output = Option<CodeLabel>>
pub fn prettier_plugins(&self) -> &[&'static str]
Auto Trait Implementations§
impl !RefUnwindSafe for CachedLspAdapter
impl Send for CachedLspAdapter
impl Sync for CachedLspAdapter
impl Unpin for CachedLspAdapter
impl !UnwindSafe for CachedLspAdapter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more