Struct zed2::languages::LanguageRegistry
source · pub struct LanguageRegistry { /* private fields */ }
Implementations§
source§impl LanguageRegistry
impl LanguageRegistry
pub fn new(login_shell_env_loaded: Task<()>) -> LanguageRegistry
pub fn set_executor(&mut self, executor: BackgroundExecutor)
sourcepub fn reload(&self)
pub fn reload(&self)
Clear out all of the loaded languages and reload them from scratch.
This is useful in development, when queries have changed.
pub fn register( &self, path: &'static str, config: LanguageConfig, grammar: Language, lsp_adapters: Vec<Arc<dyn LspAdapter, Global>, Global>, get_queries: fn(_: &str) -> LanguageQueries )
pub fn language_names(&self) -> Vec<String, Global>
pub fn add(&self, language: Arc<Language, Global>)
pub fn subscribe(&self) -> Receiver<()>
sourcepub fn version(&self) -> usize
pub fn version(&self) -> usize
The number of times that the registry has been changed, by adding languages or reloading.
sourcepub fn reload_count(&self) -> usize
pub fn reload_count(&self) -> usize
The number of times that the registry has been reloaded.
pub fn set_theme(&self, theme: Arc<Theme, Global>)
pub fn set_language_server_download_dir( &mut self, path: impl Into<Arc<Path, Global>> )
pub fn language_for_name( self: &Arc<LanguageRegistry, Global>, name: &str ) -> UnwrapFuture<Receiver<Result<Arc<Language, Global>, Error>>>
pub fn language_for_name_or_extension( self: &Arc<LanguageRegistry, Global>, string: &str ) -> UnwrapFuture<Receiver<Result<Arc<Language, Global>, Error>>>
pub fn language_for_file( self: &Arc<LanguageRegistry, Global>, path: impl AsRef<Path>, content: Option<&Rope> ) -> UnwrapFuture<Receiver<Result<Arc<Language, Global>, Error>>>
pub fn to_vec(&self) -> Vec<Arc<Language, Global>, Global>
pub fn create_pending_language_server( self: &Arc<LanguageRegistry, Global>, stderr_capture: Arc<Mutex<RawMutex, Option<String>>, Global>, language: Arc<Language, Global>, adapter: Arc<CachedLspAdapter, Global>, root_path: Arc<Path, Global>, delegate: Arc<dyn LspAdapterDelegate, Global>, cx: &mut AppContext ) -> Option<PendingLanguageServer>
pub fn language_server_binary_statuses( &self ) -> UnboundedReceiver<(Arc<Language, Global>, LanguageServerBinaryStatus)>
pub fn delete_server_container( &self, adapter: Arc<CachedLspAdapter, Global>, cx: &mut AppContext ) -> Task<()>
pub fn next_language_server_id(&self) -> LanguageServerId
Auto Trait Implementations§
impl !RefUnwindSafe for LanguageRegistry
impl Send for LanguageRegistry
impl Sync for LanguageRegistry
impl Unpin for LanguageRegistry
impl !UnwindSafe for LanguageRegistry
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