swls-core 0.1.1

Core LSP infrastructure for the Semantic Web Language Server
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use bevy_ecs::{component::Component, schedule::ScheduleLabel, world::World};

/// [`Component`] indicating that the current document is handling a CodeAction request.
#[derive(Component, Debug, Default)]
pub struct CodeActionRequest(pub Vec<crate::lsp_types::CodeAction>);

/// [`ScheduleLabel`] related to the CodeAction schedule, this is language specific
#[derive(ScheduleLabel, Clone, Eq, PartialEq, Debug, Hash)]
pub struct Label;

pub fn setup_schedule(world: &mut World) {
    let schedule = bevy_ecs::schedule::Schedule::new(Label);
    world.add_schedule(schedule);
}