pub struct Language { /* private fields */ }
Implementations§
source§impl Language
impl Language
pub fn new(config: LanguageConfig, ts_language: Option<Language>) -> Self
pub fn lsp_adapters(&self) -> &[Arc<CachedLspAdapter>]
pub fn id(&self) -> Option<usize>
pub fn with_queries(self, queries: LanguageQueries) -> Result<Self>
pub fn with_highlights_query(self, source: &str) -> Result<Self>
pub fn with_outline_query(self, source: &str) -> Result<Self>
pub fn with_embedding_query(self, source: &str) -> Result<Self>
pub fn with_brackets_query(self, source: &str) -> Result<Self>
pub fn with_indents_query(self, source: &str) -> Result<Self>
pub fn with_injection_query(self, source: &str) -> Result<Self>
pub fn with_override_query(self, source: &str) -> Result<Self>
pub async fn with_lsp_adapters( self, lsp_adapters: Vec<Arc<dyn LspAdapter>> ) -> Self
pub fn name(&self) -> Arc<str>
pub async fn disk_based_diagnostic_sources(&self) -> &[String]
pub async fn disk_based_diagnostics_progress_token(&self) -> Option<&str>
pub async fn process_completion( self: &Arc<Self>, completion: &mut CompletionItem )
pub async fn label_for_completion( self: &Arc<Self>, completion: &CompletionItem ) -> Option<CodeLabel>
pub async fn label_for_symbol( self: &Arc<Self>, name: &str, kind: SymbolKind ) -> Option<CodeLabel>
pub fn highlight_text<'a>( self: &'a Arc<Self>, text: &'a Rope, range: Range<usize> ) -> Vec<(Range<usize>, HighlightId)>
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>>
pub fn default_scope(self: &Arc<Self>) -> 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.