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