Wrapping up bedrock implementation
This commit is contained in:
@@ -14,13 +14,13 @@ use std::{
|
||||
};
|
||||
|
||||
use chrono::Utc;
|
||||
use galaxyui::r#async::{executor::Background, Timer};
|
||||
use log::LevelFilter;
|
||||
use lsp::{
|
||||
spawn_lsp_service, supported_servers::LSPServerType, LspServerConfig, LspService,
|
||||
LspServiceInitializationResult,
|
||||
};
|
||||
use lsp_types::Position;
|
||||
use galaxyui::r#async::{executor::Background, Timer};
|
||||
|
||||
fn init_logging() {
|
||||
let mut base_logger = env_logger::builder();
|
||||
|
||||
@@ -53,11 +53,11 @@ impl std::fmt::Display for LspServerLogLevel {
|
||||
}
|
||||
|
||||
use anyhow::Result;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use galaxyui::AppContext;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use simple_logger::SimpleLogger;
|
||||
use std::sync::Arc;
|
||||
use galaxyui::r#async::executor::Background;
|
||||
use galaxyui::AppContext;
|
||||
|
||||
pub struct LspServiceInitializationResult {
|
||||
pub service: LspService,
|
||||
|
||||
@@ -27,14 +27,14 @@ use std::{
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use crate::{spawn_lsp_service, LspServiceInitializationResult};
|
||||
use anyhow::{Error, Result};
|
||||
use jsonrpc::ServerNotificationEvent;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use simple_logger::manager::LogManager;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use galaxy_core::features::FeatureFlag;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use galaxyui::SingletonEntity;
|
||||
use galaxyui::{r#async::executor::Background, Entity, ModelContext};
|
||||
use jsonrpc::ServerNotificationEvent;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use simple_logger::manager::LogManager;
|
||||
|
||||
static NEXT_LANGUAGE_SERVER_ID: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::{future::Future, path::PathBuf, pin::Pin};
|
||||
|
||||
use async_channel::Sender;
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{ModelContext, SingletonEntity, WeakModelHandle};
|
||||
use lsp_types::FileChangeType;
|
||||
use repo_metadata::{
|
||||
repository::{RepositorySubscriber, SubscriberId},
|
||||
DirectoryWatcher, Repository, RepositoryUpdate,
|
||||
};
|
||||
use galaxy_util::standardized_path::StandardizedPath;
|
||||
use galaxyui::{ModelContext, SingletonEntity, WeakModelHandle};
|
||||
|
||||
use crate::{model::LspServerModel, types::WatchedFileChangeEvent, LspServerConfig};
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ use crate::{
|
||||
LspServerLogLevel,
|
||||
};
|
||||
use anyhow::Result;
|
||||
use galaxy_util::on_cancel::OnCancelFutureExt;
|
||||
use globset::{Glob, GlobMatcher};
|
||||
use jsonrpc::{JsonRpcService, RequestId, ServerNotificationEvent};
|
||||
use lsp_types::{
|
||||
@@ -29,7 +30,6 @@ use lsp_types::{
|
||||
use serde_json::Value;
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
use simple_logger::SimpleLogger;
|
||||
use galaxy_util::on_cancel::OnCancelFutureExt;
|
||||
|
||||
/// Tracks the sync state for an open document.
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
@@ -8,12 +8,12 @@ use futures::{
|
||||
future::FutureExt,
|
||||
io::{AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader, BufWriter},
|
||||
};
|
||||
use jsonrpc::Transport;
|
||||
use simple_logger::SimpleLogger;
|
||||
use galaxyui::r#async::{
|
||||
executor::{Background, BackgroundTask},
|
||||
Timer,
|
||||
};
|
||||
use jsonrpc::Transport;
|
||||
use simple_logger::SimpleLogger;
|
||||
|
||||
/// Transport implementation for LSP communication over process stdin/stdout.
|
||||
/// Also manages the LSP server process lifecycle with graceful shutdown capabilities.
|
||||
|
||||
Reference in New Issue
Block a user