Skip to main content

pathfinder_lsp/
lib.rs

1//! Pathfinder LSP client — the Lawyer engine.
2//!
3//! This crate provides the [`Lawyer`] trait (the testability boundary for
4//! all LSP operations) and supporting types.
5//!
6//! # Module Layout
7//!
8//! - [`error`]  — error types for LSP operations
9//! - [`types`]  — result types returned by the Lawyer trait
10//! - [`lawyer`] — the `Lawyer` trait itself
11//! - [`client`] — `LspClient` production implementation
12//! - [`mock`]   — `MockLawyer` test double
13//! - [`no_op`]  — `NoOpLawyer` for graceful degradation when no LSP is configured
14
15/// Client module.
16pub mod client;
17/// Module for error handling and definitions.
18pub mod error;
19/// Module for legal functionalities.
20/// The `lawyer` module providing legal-related functionality.
21pub mod lawyer;
22/// Mock implementation for testing.
23pub mod mock;
24/// The `no_op` module provides no-operation stub implementations.
25pub mod no_op;
26
27/// LT-2: Language Plugin trait — per-language behaviour abstraction.
28pub mod plugin;
29
30/// Module containing type definitions for the language server protocol.
31pub mod types;
32
33pub use client::LspClient;
34pub use error::LspError;
35pub use lawyer::Lawyer;
36pub use mock::MockLawyer;
37pub use no_op::NoOpLawyer;
38pub use types::DefinitionLocation;
39
40pub use plugin::{
41    all_plugins, plugin_for_extension, plugin_for_language, GoPlugin, LanguagePlugin, LspCandidate,
42    PythonPlugin, RustPlugin, TypeScriptPlugin,
43};