pub struct LspServer { /* private fields */ }Expand description
Managed LSP server instance with capabilities and encoding.
Implementations§
Source§impl LspServer
impl LspServer
Sourcepub async fn spawn(config: ServerInitConfig) -> Result<Self>
pub async fn spawn(config: ServerInitConfig) -> Result<Self>
Spawn and initialize LSP server.
This performs the complete initialization sequence:
- Spawns the LSP server as a child process
- Sends initialize request with client capabilities
- Receives server capabilities from initialize response
- Sends initialized notification
§Errors
Returns an error if:
- Server process fails to spawn
- Initialize request fails or times out
- Server returns error during initialization
Sourcepub const fn capabilities(&self) -> &ServerCapabilities
pub const fn capabilities(&self) -> &ServerCapabilities
Get server capabilities.
Sourcepub fn position_encoding(&self) -> PositionEncodingKind
pub fn position_encoding(&self) -> PositionEncodingKind
Get negotiated position encoding.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LspServer
impl !RefUnwindSafe for LspServer
impl Send for LspServer
impl Sync for LspServer
impl Unpin for LspServer
impl !UnwindSafe for LspServer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more