pub struct Language { /* private fields */ }
Implementations§
source§impl Language
impl Language
pub fn new(config: LanguageConfig, ts_language: Option<Language>) -> Language
pub fn lsp_adapters(&self) -> &[Arc<CachedLspAdapter, Global>]
pub fn id(&self) -> Option<usize>
pub fn with_queries(self, queries: LanguageQueries) -> Result<Language, Error>
pub fn with_highlights_query(self, source: &str) -> Result<Language, Error>
pub fn with_outline_query(self, source: &str) -> Result<Language, Error>
pub fn with_embedding_query(self, source: &str) -> Result<Language, Error>
pub fn with_brackets_query(self, source: &str) -> Result<Language, Error>
pub fn with_indents_query(self, source: &str) -> Result<Language, Error>
pub fn with_injection_query(self, source: &str) -> Result<Language, Error>
pub fn with_override_query(self, source: &str) -> Result<Language, Error>
pub async fn with_lsp_adapters( self, lsp_adapters: Vec<Arc<dyn LspAdapter, Global>, Global> ) -> impl Future<Output = Language>
pub fn name(&self) -> Arc<str, Global>
pub async fn disk_based_diagnostic_sources( &self ) -> impl Future<Output = &[String]>
pub async fn disk_based_diagnostics_progress_token( &self ) -> impl Future<Output = Option<&str>>
pub async fn process_completion( self: &Arc<Language, Global>, completion: &mut CompletionItem ) -> impl Future<Output = ()>
pub async fn label_for_completion( self: &Arc<Language, Global>, completion: &CompletionItem ) -> impl Future<Output = Option<CodeLabel>>
pub async fn label_for_symbol( self: &Arc<Language, Global>, name: &str, kind: SymbolKind ) -> impl Future<Output = Option<CodeLabel>>
pub fn highlight_text<'a>( self: &'a Arc<Language, Global>, text: &'a Rope, range: Range<usize> ) -> Vec<(Range<usize>, HighlightId), Global>
pub fn path_suffixes(&self) -> &[String]
pub fn should_autoclose_before(&self, c: char) -> bool
pub fn set_theme(&self, theme: &SyntaxTheme)
pub fn grammar(&self) -> Option<&Arc<Grammar, Global>>
pub fn default_scope(self: &Arc<Language, Global>) -> LanguageScope
pub fn prettier_parser_name(&self) -> Option<&str>
Trait Implementations§
source§impl PartialEq<Language> for Language
impl PartialEq<Language> for Language
impl Eq for Language
Auto Trait Implementations§
impl !RefUnwindSafe for Language
impl Send for Language
impl Sync for Language
impl Unpin for Language
impl !UnwindSafe for Language
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.