Module lsp

Module lsp 

Source
Expand description

Language Server Protocol (LSP) integration Language Server Protocol (LSP) integration for async-inspect

This module provides a Language Server Protocol server that enables async-inspect functionality in any LSP-compatible editor (vim, emacs, Sublime Text, etc.).

§Features

  • Code Actions: Quick-fix suggestions for adding async-inspect instrumentation
  • Diagnostics: Warnings for potential async issues and performance problems
  • Hover Information: Display task statistics and performance metrics
  • Completion: Auto-complete for async-inspect methods

§Example

use async_inspect::lsp::AsyncInspectLanguageServer;

#[tokio::main]
async fn main() {
    let (service, socket) = tower_lsp::LspService::new(|client| {
        AsyncInspectLanguageServer::new(client)
    });

    tower_lsp::Server::new(tokio::io::stdin(), tokio::io::stdout(), socket)
        .serve(service)
        .await;
}

Structs§

AsyncInspectLanguageServer
Language server for async-inspect