Skip to main content

register_rdf_lang

Function register_rdf_lang 

Source
pub fn register_rdf_lang<L, H>(
    world: &mut World,
    language_id: &'static [&'static str],
    extensions: &'static [&'static str],
)
where L: Lang + Component + Default + Send + Sync + 'static, L::ElementError: 'static + Clone, H: LangHelper + Default + Send + Sync + 'static,
Expand description

Register a language with the ECS world, handling all setup_world() boilerplate:

  • Semantic token type registration in SemanticTokensDict
  • CreateEvent observer for file detection by language_id or extension
  • Diagnostics system scheduling
  • Basic semantic highlighting scheduling

Call language-specific setup (parsing, completion, code actions, etc.) after this function.

ยงType parameters

  • L: The language marker component (e.g. TurtleLang). Must implement Default.
  • H: The language helper (e.g. TurtleHelper). Must implement Default.