pub struct LanguageRegistry { /* private fields */ }

Implementations§

source§

impl LanguageRegistry

source

pub fn new(login_shell_env_loaded: Task<()>) -> Self

source

pub fn set_executor(&mut self, executor: BackgroundExecutor)

source

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.

source

pub fn register( &self, path: &'static str, config: LanguageConfig, grammar: Language, lsp_adapters: Vec<Arc<dyn LspAdapter>>, get_queries: fn(_: &str) -> LanguageQueries )

source

pub fn language_names(&self) -> Vec<String>

source

pub fn add(&self, language: Arc<Language>)

source

pub fn subscribe(&self) -> Receiver<()>

source

pub fn version(&self) -> usize

The number of times that the registry has been changed, by adding languages or reloading.

source

pub fn reload_count(&self) -> usize

The number of times that the registry has been reloaded.

source

pub fn set_theme(&self, theme: Arc<Theme>)

source

pub fn set_language_server_download_dir(&mut self, path: impl Into<Arc<Path>>)

source

pub fn language_for_name( self: &Arc<Self>, name: &str ) -> UnwrapFuture<Receiver<Result<Arc<Language>>>>

source

pub fn language_for_name_or_extension( self: &Arc<Self>, string: &str ) -> UnwrapFuture<Receiver<Result<Arc<Language>>>>

source

pub fn language_for_file( self: &Arc<Self>, path: impl AsRef<Path>, content: Option<&Rope> ) -> UnwrapFuture<Receiver<Result<Arc<Language>>>>

source

pub fn to_vec(&self) -> Vec<Arc<Language>>

source

pub fn create_pending_language_server( self: &Arc<Self>, stderr_capture: Arc<Mutex<Option<String>>>, language: Arc<Language>, adapter: Arc<CachedLspAdapter>, root_path: Arc<Path>, delegate: Arc<dyn LspAdapterDelegate>, cx: &mut AppContext ) -> Option<PendingLanguageServer>

source

pub fn language_server_binary_statuses( &self ) -> UnboundedReceiver<(Arc<Language>, LanguageServerBinaryStatus)>

source

pub fn delete_server_container( &self, adapter: Arc<CachedLspAdapter>, cx: &mut AppContext ) -> Task<()>

source

pub fn next_language_server_id(&self) -> LanguageServerId

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more