create_default_manager

Function create_default_manager 

Source
pub fn create_default_manager() -> SyntaxResult<SyntaxManager>
Expand description

Create the default syntax manager based on available features.

This function will:

  • Use Syntastica if the ‘syntastica’ feature is enabled
  • Use Syntect if the ‘syntect’ feature is enabled
  • Return an error if both are enabled (mutual exclusivity check)
  • Return an error if neither is enabled

Note: While the Syntect feature is enabled, the two-face crate will also be pulled to provide additional Syntax highlighting.

§Errors

Returns an error if both syntastica and syntect features are enabled, or if neither feature is enabled, or if backend initialization fails.