lsp_core/feature/
format.rs

1use bevy_ecs::{component::Component, schedule::ScheduleLabel, world::World};
2use derive_more::{AsMut, AsRef, Deref, DerefMut};
3
4/// [`Component`] indicating that the current document is currently handling a Format request.
5#[derive(Component, AsRef, Deref, AsMut, DerefMut, Debug)]
6pub struct FormatRequest(pub Option<Vec<lsp_types::TextEdit>>);
7
8/// [`ScheduleLabel`] related to the Format schedule, this is language specific
9#[derive(ScheduleLabel, Clone, Eq, PartialEq, Debug, Hash)]
10pub struct Label;
11
12pub fn setup_schedule(world: &mut World) {
13    let format = bevy_ecs::schedule::Schedule::new(Label);
14    // inlay.add_systems(inlay_triples);
15    world.add_schedule(format);
16}