codeinput 0.1.0

A powerful library for parsing, analyzing, and managing CODEOWNERS files. Provides advanced querying capabilities, ownership analysis, and tag-based file organization.
Documentation
//! LSP command handler
//!
//! Starts the Language Server Protocol server for IDE integration.

use crate::utils::error::Result;

#[cfg(feature = "tower-lsp")]
use crate::lsp::server::{run_lsp_server, run_lsp_server_tcp};

/// Run the LSP server
#[cfg(feature = "tower-lsp")]
pub fn run(port: Option<u16>) -> Result<()> {
    let rt = tokio::runtime::Runtime::new()?;
    rt.block_on(async {
        match port {
            Some(p) => run_lsp_server_tcp(p).await,
            None => run_lsp_server().await,
        }
    })
}