Mountain/Vine/Server/Notification/SetLanguageConfiguration.rs
1//! Cocoon → Mountain `set_language_configuration` notification.
2//! Emitted by `Cocoon/.../APIFactoryService.ts:557` when an extension
3//! calls `vscode.languages.setLanguageConfiguration(languageId, config)`.
4//! Carries brackets / indent rules / word-pattern / comments. Forwards on
5//! `sky://language/configure`; Monaco's config side reads the payload and
6//! calls `monaco.languages.setLanguageConfiguration(...)`.
7
8use serde_json::Value;
9use tauri::Emitter;
10
11use crate::{Vine::Server::MountainVinegRPCService::MountainVinegRPCService, dev_log};
12
13pub async fn SetLanguageConfiguration(Service:&MountainVinegRPCService, Parameter:&Value) {
14 let _ = Service.ApplicationHandle().emit("sky://language/configure", Parameter);
15
16 dev_log!(
17 "grpc",
18 "[Language] configure id={}",
19 Parameter.get("languageId").and_then(Value::as_str).unwrap_or("?")
20 );
21}