Struct tree_sitter_loader::Loader
source · pub struct Loader { /* private fields */ }
Implementations§
source§impl Loader
impl Loader
pub fn new() -> Result<Self>
pub fn with_parser_lib_path(parser_lib_path: PathBuf) -> Self
pub fn configure_highlights(&mut self, names: &[String])
pub fn highlight_names(&self) -> Vec<String>
pub fn find_all_languages(&mut self, config: &Config) -> Result<()>
pub fn languages_at_path( &mut self, path: &Path ) -> Result<Vec<(Language, String)>>
pub fn get_all_language_configurations( &self ) -> Vec<(&LanguageConfiguration<'_>, &Path)>
pub fn language_configuration_for_scope( &self, scope: &str ) -> Result<Option<(Language, &LanguageConfiguration<'_>)>>
pub fn language_configuration_for_first_line_regex( &self, path: &Path ) -> Result<Option<(Language, &LanguageConfiguration<'_>)>>
pub fn language_configuration_for_file_name( &self, path: &Path ) -> Result<Option<(Language, &LanguageConfiguration<'_>)>>
pub fn language_configuration_for_injection_string( &self, string: &str ) -> Result<Option<(Language, &LanguageConfiguration<'_>)>>
pub fn load_language_at_path( &self, src_path: &Path, header_paths: &[&Path], external_files: Option<&[PathBuf]> ) -> Result<Language>
pub fn load_language_at_path_with_name( &self, src_path: &Path, header_paths: &[&Path], name: &str, external_files: Option<&[PathBuf]> ) -> Result<Language>
pub fn compile_parser_to_wasm( &self, language_name: &str, src_path: &Path, scanner_filename: Option<&Path>, output_path: &Path, force_docker: bool ) -> Result<(), Error>
pub fn highlight_config_for_injection_string<'a>( &'a self, string: &str ) -> Option<&'a HighlightConfiguration>
pub fn find_language_configurations_at_path( &mut self, parser_path: &Path, set_current_path_config: bool ) -> Result<&[LanguageConfiguration<'_>]>
pub fn select_language( &mut self, path: &Path, current_dir: &Path, scope: Option<&str> ) -> Result<Language>
pub fn use_debug_build(&mut self, flag: bool)
pub fn get_scanner_path(&self, src_path: &Path) -> Option<PathBuf>
Trait Implementations§
Auto Trait Implementations§
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