pub struct Backend {
pub client: Client,
pub fixture_db: Arc<FixtureDatabase>,
pub workspace_root: Arc<RwLock<Option<PathBuf>>>,
pub original_workspace_root: Arc<RwLock<Option<PathBuf>>>,
pub scan_task: Arc<Mutex<Option<JoinHandle<()>>>>,
pub uri_cache: Arc<DashMap<PathBuf, Uri>>,
pub config: Arc<RwLock<Config>>,
}Expand description
The LSP Backend struct containing server state.
Fields§
§client: Client§fixture_db: Arc<FixtureDatabase>§workspace_root: Arc<RwLock<Option<PathBuf>>>The canonical workspace root path (resolved symlinks)
original_workspace_root: Arc<RwLock<Option<PathBuf>>>The original workspace root path as provided by the client (may contain symlinks)
scan_task: Arc<Mutex<Option<JoinHandle<()>>>>Handle to the background workspace scan task, used for cancellation on shutdown
uri_cache: Arc<DashMap<PathBuf, Uri>>Cache mapping canonical paths to original URIs from the client This ensures we respond with URIs the client recognizes
config: Arc<RwLock<Config>>Configuration loaded from pyproject.toml
Implementations§
Source§impl Backend
impl Backend
Sourcepub async fn handle_prepare_call_hierarchy(
&self,
params: CallHierarchyPrepareParams,
) -> Result<Option<Vec<CallHierarchyItem>>>
pub async fn handle_prepare_call_hierarchy( &self, params: CallHierarchyPrepareParams, ) -> Result<Option<Vec<CallHierarchyItem>>>
Handle prepareCallHierarchy request.
Returns a CallHierarchyItem for the fixture at the cursor position.
Sourcepub async fn handle_incoming_calls(
&self,
params: CallHierarchyIncomingCallsParams,
) -> Result<Option<Vec<CallHierarchyIncomingCall>>>
pub async fn handle_incoming_calls( &self, params: CallHierarchyIncomingCallsParams, ) -> Result<Option<Vec<CallHierarchyIncomingCall>>>
Handle callHierarchy/incomingCalls request.
Returns all fixtures and tests that use the given fixture.
Sourcepub async fn handle_outgoing_calls(
&self,
params: CallHierarchyOutgoingCallsParams,
) -> Result<Option<Vec<CallHierarchyOutgoingCall>>>
pub async fn handle_outgoing_calls( &self, params: CallHierarchyOutgoingCallsParams, ) -> Result<Option<Vec<CallHierarchyOutgoingCall>>>
Handle callHierarchy/outgoingCalls request.
Returns all fixtures that the given fixture depends on.
Source§impl Backend
impl Backend
Sourcepub async fn handle_code_action(
&self,
params: CodeActionParams,
) -> Result<Option<CodeActionResponse>>
pub async fn handle_code_action( &self, params: CodeActionParams, ) -> Result<Option<CodeActionResponse>>
Handle textDocument/codeAction request.
Source§impl Backend
impl Backend
Sourcepub async fn handle_code_lens(
&self,
params: CodeLensParams,
) -> Result<Option<Vec<CodeLens>>>
pub async fn handle_code_lens( &self, params: CodeLensParams, ) -> Result<Option<Vec<CodeLens>>>
Handle code lens request - returns lenses for all fixtures in the file
Source§impl Backend
impl Backend
Sourcepub async fn handle_completion(
&self,
params: CompletionParams,
) -> Result<Option<CompletionResponse>>
pub async fn handle_completion( &self, params: CompletionParams, ) -> Result<Option<CompletionResponse>>
Handle completion request
Source§impl Backend
impl Backend
Sourcepub async fn handle_goto_definition(
&self,
params: GotoDefinitionParams,
) -> Result<Option<GotoDefinitionResponse>>
pub async fn handle_goto_definition( &self, params: GotoDefinitionParams, ) -> Result<Option<GotoDefinitionResponse>>
Handle goto_definition request
Source§impl Backend
impl Backend
Sourcepub async fn publish_diagnostics_for_file(&self, uri: &Uri, file_path: &Path)
pub async fn publish_diagnostics_for_file(&self, uri: &Uri, file_path: &Path)
Publish diagnostics for undeclared fixtures and circular dependencies in a file
Source§impl Backend
impl Backend
Sourcepub async fn handle_document_symbol(
&self,
params: DocumentSymbolParams,
) -> Result<Option<DocumentSymbolResponse>>
pub async fn handle_document_symbol( &self, params: DocumentSymbolParams, ) -> Result<Option<DocumentSymbolResponse>>
Handle textDocument/documentSymbol request.
Returns all fixture definitions in the document as symbols. This enables outline view and breadcrumb navigation in editors.
Source§impl Backend
impl Backend
Sourcepub async fn handle_hover(&self, params: HoverParams) -> Result<Option<Hover>>
pub async fn handle_hover(&self, params: HoverParams) -> Result<Option<Hover>>
Handle hover request
Source§impl Backend
impl Backend
Sourcepub async fn handle_goto_implementation(
&self,
params: GotoImplementationParams,
) -> Result<Option<GotoImplementationResponse>>
pub async fn handle_goto_implementation( &self, params: GotoImplementationParams, ) -> Result<Option<GotoImplementationResponse>>
Handle goto_implementation request.
For fixtures, “implementation” is the yield statement (if present). This allows jumping to where the fixture value is actually produced in generator fixtures.
Source§impl Backend
impl Backend
Sourcepub async fn handle_inlay_hint(
&self,
params: InlayHintParams,
) -> Result<Option<Vec<InlayHint>>>
pub async fn handle_inlay_hint( &self, params: InlayHintParams, ) -> Result<Option<Vec<InlayHint>>>
Handle inlay hints request.
Returns type hints for fixture parameters when the fixture has an explicit return type annotation. This helps developers understand what type each fixture provides without having to navigate to its definition.
Skips parameters that already have a type annotation to avoid redundancy.
Source§impl Backend
impl Backend
Sourcepub async fn handle_references(
&self,
params: ReferenceParams,
) -> Result<Option<Vec<Location>>>
pub async fn handle_references( &self, params: ReferenceParams, ) -> Result<Option<Vec<Location>>>
Handle references request
Source§impl Backend
impl Backend
Sourcepub async fn handle_workspace_symbol(
&self,
params: WorkspaceSymbolParams,
) -> Result<Option<Vec<SymbolInformation>>>
pub async fn handle_workspace_symbol( &self, params: WorkspaceSymbolParams, ) -> Result<Option<Vec<SymbolInformation>>>
Handle workspace/symbol request.
Returns all fixture definitions matching the query string. This enables “Go to Symbol in Workspace” (Cmd+T / Ctrl+T) in editors.
Source§impl Backend
impl Backend
Sourcepub fn new(client: Client, fixture_db: Arc<FixtureDatabase>) -> Self
pub fn new(client: Client, fixture_db: Arc<FixtureDatabase>) -> Self
Create a new Backend instance
Sourcepub fn uri_to_path(&self, uri: &Uri) -> Option<PathBuf>
pub fn uri_to_path(&self, uri: &Uri) -> Option<PathBuf>
Convert URI to PathBuf with error logging Canonicalizes the path to handle symlinks (e.g., /var -> /private/var on macOS)
Sourcepub fn path_to_uri(&self, path: &Path) -> Option<Uri>
pub fn path_to_uri(&self, path: &Path) -> Option<Uri>
Convert PathBuf to URI with error logging First checks the URI cache for a previously seen URI, then falls back to creating one
Sourcepub fn lsp_line_to_internal(line: u32) -> usize
pub fn lsp_line_to_internal(line: u32) -> usize
Convert LSP position (0-based line) to internal representation (1-based line)
Sourcepub fn internal_line_to_lsp(line: usize) -> u32
pub fn internal_line_to_lsp(line: usize) -> u32
Convert internal line (1-based) to LSP position (0-based)
Sourcepub fn create_range(
start_line: u32,
start_char: u32,
end_line: u32,
end_char: u32,
) -> Range
pub fn create_range( start_line: u32, start_char: u32, end_line: u32, end_char: u32, ) -> Range
Create a Range from start and end positions
Sourcepub fn create_point_range(line: u32, character: u32) -> Range
pub fn create_point_range(line: u32, character: u32) -> Range
Create a point Range (start == end) for a single position
Sourcepub fn format_fixture_documentation(
fixture: &FixtureDefinition,
workspace_root: Option<&PathBuf>,
) -> String
pub fn format_fixture_documentation( fixture: &FixtureDefinition, workspace_root: Option<&PathBuf>, ) -> String
Format fixture documentation for display (used in both hover and completions)
Trait Implementations§
Source§impl LanguageServer for Backend
impl LanguageServer for Backend
Source§async fn initialize(&self, params: InitializeParams) -> Result<InitializeResult>
async fn initialize(&self, params: InitializeParams) -> Result<InitializeResult>
initialize request is the first request sent from the client to the server. Read moreSource§async fn initialized(&self, _: InitializedParams)
async fn initialized(&self, _: InitializedParams)
initialized notification is sent from the client to the server after the client
received the result of the initialize request but before the client sends anything else. Read moreSource§async fn did_open(&self, params: DidOpenTextDocumentParams)
async fn did_open(&self, params: DidOpenTextDocumentParams)
textDocument/didOpen notification is sent from the client to the server to signal
that a new text document has been opened by the client. Read moreSource§async fn did_change(&self, params: DidChangeTextDocumentParams)
async fn did_change(&self, params: DidChangeTextDocumentParams)
textDocument/didChange notification is sent from the client to the server to signal
changes to a text document. Read moreSource§async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams)
async fn did_change_watched_files(&self, params: DidChangeWatchedFilesParams)
workspace/didChangeWatchedFiles notification is sent from the client to the server
when the client detects changes to files watched by the language client. Read moreSource§async fn did_close(&self, params: DidCloseTextDocumentParams)
async fn did_close(&self, params: DidCloseTextDocumentParams)
textDocument/didClose notification is sent from the client to the server when the
document got closed in the client. Read moreSource§async fn goto_definition(
&self,
params: GotoDefinitionParams,
) -> Result<Option<GotoDefinitionResponse>>
async fn goto_definition( &self, params: GotoDefinitionParams, ) -> Result<Option<GotoDefinitionResponse>>
textDocument/definition request asks the server for the definition location of a
symbol at a given text document position. Read moreSource§async fn goto_implementation(
&self,
params: GotoImplementationParams,
) -> Result<Option<GotoImplementationResponse>>
async fn goto_implementation( &self, params: GotoImplementationParams, ) -> Result<Option<GotoImplementationResponse>>
textDocument/implementation request is sent from the client to the server to resolve
the implementation location of a symbol at a given text document position. Read moreSource§async fn hover(&self, params: HoverParams) -> Result<Option<Hover>>
async fn hover(&self, params: HoverParams) -> Result<Option<Hover>>
textDocument/hover request asks the server for hover information at a given text
document position. Read moreSource§async fn references(
&self,
params: ReferenceParams,
) -> Result<Option<Vec<Location>>>
async fn references( &self, params: ReferenceParams, ) -> Result<Option<Vec<Location>>>
textDocument/references request is sent from the client to the server to resolve
project-wide references for the symbol denoted by the given text document position.Source§async fn completion(
&self,
params: CompletionParams,
) -> Result<Option<CompletionResponse>>
async fn completion( &self, params: CompletionParams, ) -> Result<Option<CompletionResponse>>
textDocument/completion request is sent from the client to the server to compute
completion items at a given cursor position. Read moreSource§async fn code_action(
&self,
params: CodeActionParams,
) -> Result<Option<CodeActionResponse>>
async fn code_action( &self, params: CodeActionParams, ) -> Result<Option<CodeActionResponse>>
textDocument/codeAction request is sent from the client to the server to compute
commands for a given text document and range. These commands are typically code fixes to
either fix problems or to beautify/refactor code. Read moreSource§async fn document_symbol(
&self,
params: DocumentSymbolParams,
) -> Result<Option<DocumentSymbolResponse>>
async fn document_symbol( &self, params: DocumentSymbolParams, ) -> Result<Option<DocumentSymbolResponse>>
textDocument/documentSymbol request is sent from the client to the server to
retrieve all symbols found in a given text document. Read moreSource§async fn symbol(
&self,
params: WorkspaceSymbolParams,
) -> Result<Option<WorkspaceSymbolResponse>>
async fn symbol( &self, params: WorkspaceSymbolParams, ) -> Result<Option<WorkspaceSymbolResponse>>
workspace/symbol request is sent from the client to the server to list project-wide
symbols matching the given query string. Read moreSource§async fn code_lens(
&self,
params: CodeLensParams,
) -> Result<Option<Vec<CodeLens>>>
async fn code_lens( &self, params: CodeLensParams, ) -> Result<Option<Vec<CodeLens>>>
textDocument/codeLens request is sent from the client to the server to compute code
lenses for a given text document.Source§async fn inlay_hint(
&self,
params: InlayHintParams,
) -> Result<Option<Vec<InlayHint>>>
async fn inlay_hint( &self, params: InlayHintParams, ) -> Result<Option<Vec<InlayHint>>>
textDocument/inlayHint request is sent from the client to the server to compute
inlay hints for a given (text document, range) tuple that may be rendered in the editor
in place with other text. Read moreSource§async fn prepare_call_hierarchy(
&self,
params: CallHierarchyPrepareParams,
) -> Result<Option<Vec<CallHierarchyItem>>>
async fn prepare_call_hierarchy( &self, params: CallHierarchyPrepareParams, ) -> Result<Option<Vec<CallHierarchyItem>>>
textDocument/prepareCallHierarchy request is sent from the client to the server to
return a call hierarchy for the language element of given text document positions. Read moreSource§async fn incoming_calls(
&self,
params: CallHierarchyIncomingCallsParams,
) -> Result<Option<Vec<CallHierarchyIncomingCall>>>
async fn incoming_calls( &self, params: CallHierarchyIncomingCallsParams, ) -> Result<Option<Vec<CallHierarchyIncomingCall>>>
callHierarchy/incomingCalls request is sent from the client to the server to
resolve incoming calls for a given call hierarchy item. Read moreSource§async fn outgoing_calls(
&self,
params: CallHierarchyOutgoingCallsParams,
) -> Result<Option<Vec<CallHierarchyOutgoingCall>>>
async fn outgoing_calls( &self, params: CallHierarchyOutgoingCallsParams, ) -> Result<Option<Vec<CallHierarchyOutgoingCall>>>
callHierarchy/outgoingCalls request is sent from the client to the server to
resolve outgoing calls for a given call hierarchy item. Read moreSource§fn will_save(
&self,
params: WillSaveTextDocumentParams,
) -> impl Future<Output = ()> + Send
fn will_save( &self, params: WillSaveTextDocumentParams, ) -> impl Future<Output = ()> + Send
textDocument/willSave notification is sent from the client to the server before the
document is actually saved.Source§fn will_save_wait_until(
&self,
params: WillSaveTextDocumentParams,
) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
fn will_save_wait_until( &self, params: WillSaveTextDocumentParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
textDocument/willSaveWaitUntil request is sent from the client to the server before
the document is actually saved. Read moreSource§fn did_save(
&self,
params: DidSaveTextDocumentParams,
) -> impl Future<Output = ()> + Send
fn did_save( &self, params: DidSaveTextDocumentParams, ) -> impl Future<Output = ()> + Send
textDocument/didSave notification is sent from the client to the server when the
document was saved in the client.Source§fn notebook_did_open(
&self,
params: DidOpenNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_open( &self, params: DidOpenNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
notebookDocument/didOpen notification is sent from the client to the server when a new notebook document is opened.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn notebook_did_change(
&self,
params: DidChangeNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_change( &self, params: DidChangeNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
notebookDocument/didChange notification is sent from the client to the server when a notebook document changes.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn notebook_did_save(
&self,
params: DidSaveNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_save( &self, params: DidSaveNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
notebookDocument/didSave notification is sent from the client to the server when a notebook document is saved.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn notebook_did_close(
&self,
params: DidCloseNotebookDocumentParams,
) -> impl Future<Output = ()> + Send
fn notebook_did_close( &self, params: DidCloseNotebookDocumentParams, ) -> impl Future<Output = ()> + Send
notebookDocument/didClose notification is sent from the client to the server when a notebook document is closed.
It is only sent for notebooks selected by the notebookDocumentSync server capability.Source§fn goto_declaration(
&self,
params: GotoDefinitionParams,
) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send
fn goto_declaration( &self, params: GotoDefinitionParams, ) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send
textDocument/declaration request asks the server for the declaration location of a
symbol at a given text document position. Read moreSource§fn goto_type_definition(
&self,
params: GotoDefinitionParams,
) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send
fn goto_type_definition( &self, params: GotoDefinitionParams, ) -> impl Future<Output = Result<Option<GotoDefinitionResponse>, Error>> + Send
textDocument/typeDefinition request asks the server for the type definition location of
a symbol at a given text document position. Read moreSource§fn prepare_type_hierarchy(
&self,
params: TypeHierarchyPrepareParams,
) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send
fn prepare_type_hierarchy( &self, params: TypeHierarchyPrepareParams, ) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send
textDocument/prepareTypeHierarchy request is sent from the client to the server to
return a type hierarchy for the language element of given text document positions. Read moreSource§fn supertypes(
&self,
params: TypeHierarchySupertypesParams,
) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send
fn supertypes( &self, params: TypeHierarchySupertypesParams, ) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send
typeHierarchy/supertypes] request is sent from the client to the server to resolve
the supertypes for a given type hierarchy item. Read moreSource§fn subtypes(
&self,
params: TypeHierarchySubtypesParams,
) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send
fn subtypes( &self, params: TypeHierarchySubtypesParams, ) -> impl Future<Output = Result<Option<Vec<TypeHierarchyItem>>, Error>> + Send
typeHierarchy/subtypes] request is sent from the client to the server to resolve
the subtypes for a given type hierarchy item. Read moreSource§fn document_highlight(
&self,
params: DocumentHighlightParams,
) -> impl Future<Output = Result<Option<Vec<DocumentHighlight>>, Error>> + Send
fn document_highlight( &self, params: DocumentHighlightParams, ) -> impl Future<Output = Result<Option<Vec<DocumentHighlight>>, Error>> + Send
textDocument/documentHighlight request is sent from the client to the server to
resolve appropriate highlights for a given text document position. Read moreSource§fn document_link(
&self,
params: DocumentLinkParams,
) -> impl Future<Output = Result<Option<Vec<DocumentLink>>, Error>> + Send
fn document_link( &self, params: DocumentLinkParams, ) -> impl Future<Output = Result<Option<Vec<DocumentLink>>, Error>> + Send
textDocument/documentLink request is sent from the client to the server to request
the location of links in a document. Read moreSource§fn document_link_resolve(
&self,
params: DocumentLink,
) -> impl Future<Output = Result<DocumentLink, Error>> + Send
fn document_link_resolve( &self, params: DocumentLink, ) -> impl Future<Output = Result<DocumentLink, Error>> + Send
documentLink/resolve request is sent from the client to the server to resolve the
target of a given document link. Read moreSource§fn code_lens_resolve(
&self,
params: CodeLens,
) -> impl Future<Output = Result<CodeLens, Error>> + Send
fn code_lens_resolve( &self, params: CodeLens, ) -> impl Future<Output = Result<CodeLens, Error>> + Send
codeLens/resolve request is sent from the client to the server to resolve the
command for a given code lens item.Source§fn folding_range(
&self,
params: FoldingRangeParams,
) -> impl Future<Output = Result<Option<Vec<FoldingRange>>, Error>> + Send
fn folding_range( &self, params: FoldingRangeParams, ) -> impl Future<Output = Result<Option<Vec<FoldingRange>>, Error>> + Send
textDocument/foldingRange request is sent from the client to the server to return
all folding ranges found in a given text document. Read moreSource§fn selection_range(
&self,
params: SelectionRangeParams,
) -> impl Future<Output = Result<Option<Vec<SelectionRange>>, Error>> + Send
fn selection_range( &self, params: SelectionRangeParams, ) -> impl Future<Output = Result<Option<Vec<SelectionRange>>, Error>> + Send
textDocument/selectionRange request is sent from the client to the server to return
suggested selection ranges at an array of given positions. A selection range is a range
around the cursor position which the user might be interested in selecting. Read moreSource§fn semantic_tokens_full(
&self,
params: SemanticTokensParams,
) -> impl Future<Output = Result<Option<SemanticTokensResult>, Error>> + Send
fn semantic_tokens_full( &self, params: SemanticTokensParams, ) -> impl Future<Output = Result<Option<SemanticTokensResult>, Error>> + Send
textDocument/semanticTokens/full request is sent from the client to the server to
resolve the semantic tokens of a given file. Read moreSource§fn semantic_tokens_full_delta(
&self,
params: SemanticTokensDeltaParams,
) -> impl Future<Output = Result<Option<SemanticTokensFullDeltaResult>, Error>> + Send
fn semantic_tokens_full_delta( &self, params: SemanticTokensDeltaParams, ) -> impl Future<Output = Result<Option<SemanticTokensFullDeltaResult>, Error>> + Send
textDocument/semanticTokens/full/delta request is sent from the client to the server to
resolve the semantic tokens of a given file, returning only the delta. Read moreSource§fn semantic_tokens_range(
&self,
params: SemanticTokensRangeParams,
) -> impl Future<Output = Result<Option<SemanticTokensRangeResult>, Error>> + Send
fn semantic_tokens_range( &self, params: SemanticTokensRangeParams, ) -> impl Future<Output = Result<Option<SemanticTokensRangeResult>, Error>> + Send
textDocument/semanticTokens/range request is sent from the client to the server to
resolve the semantic tokens for the visible range of a given file. Read moreSource§fn inline_value(
&self,
params: InlineValueParams,
) -> impl Future<Output = Result<Option<Vec<InlineValue>>, Error>> + Send
fn inline_value( &self, params: InlineValueParams, ) -> impl Future<Output = Result<Option<Vec<InlineValue>>, Error>> + Send
textDocument/inlineValue request is sent from the client to the server to compute
inline values for a given text document that may be rendered in the editor at the end of
lines. Read moreSource§fn inlay_hint_resolve(
&self,
params: InlayHint,
) -> impl Future<Output = Result<InlayHint, Error>> + Send
fn inlay_hint_resolve( &self, params: InlayHint, ) -> impl Future<Output = Result<InlayHint, Error>> + Send
inlayHint/resolve request is sent from the client to the server to resolve
additional information for a given inlay hint. Read moreSource§fn moniker(
&self,
params: MonikerParams,
) -> impl Future<Output = Result<Option<Vec<Moniker>>, Error>> + Send
fn moniker( &self, params: MonikerParams, ) -> impl Future<Output = Result<Option<Vec<Moniker>>, Error>> + Send
textDocument/moniker request is sent from the client to the server to get the
symbol monikers for a given text document position. Read moreSource§fn completion_resolve(
&self,
params: CompletionItem,
) -> impl Future<Output = Result<CompletionItem, Error>> + Send
fn completion_resolve( &self, params: CompletionItem, ) -> impl Future<Output = Result<CompletionItem, Error>> + Send
completionItem/resolve request is sent from the client to the server to resolve
additional information for a given completion item.Source§fn diagnostic(
&self,
params: DocumentDiagnosticParams,
) -> impl Future<Output = Result<DocumentDiagnosticReportResult, Error>> + Send
fn diagnostic( &self, params: DocumentDiagnosticParams, ) -> impl Future<Output = Result<DocumentDiagnosticReportResult, Error>> + Send
textDocument/diagnostic request is sent from the client to the server to ask the
server to compute the diagnostics for a given document. Read moreSource§fn workspace_diagnostic(
&self,
params: WorkspaceDiagnosticParams,
) -> impl Future<Output = Result<WorkspaceDiagnosticReportResult, Error>> + Send
fn workspace_diagnostic( &self, params: WorkspaceDiagnosticParams, ) -> impl Future<Output = Result<WorkspaceDiagnosticReportResult, Error>> + Send
workspace/diagnostic request is sent from the client to the server to ask the
server to compute workspace wide diagnostics which previously where pushed from the server
to the client. Read moreSource§fn signature_help(
&self,
params: SignatureHelpParams,
) -> impl Future<Output = Result<Option<SignatureHelp>, Error>> + Send
fn signature_help( &self, params: SignatureHelpParams, ) -> impl Future<Output = Result<Option<SignatureHelp>, Error>> + Send
textDocument/signatureHelp request is sent from the client to the server to request
signature information at a given cursor position.Source§fn code_action_resolve(
&self,
params: CodeAction,
) -> impl Future<Output = Result<CodeAction, Error>> + Send
fn code_action_resolve( &self, params: CodeAction, ) -> impl Future<Output = Result<CodeAction, Error>> + Send
codeAction/resolve request is sent from the client to the server to resolve
additional information for a given code action. Read moreSource§fn document_color(
&self,
params: DocumentColorParams,
) -> impl Future<Output = Result<Vec<ColorInformation>, Error>> + Send
fn document_color( &self, params: DocumentColorParams, ) -> impl Future<Output = Result<Vec<ColorInformation>, Error>> + Send
textDocument/documentColor request is sent from the client to the server to list
all color references found in a given text document. Along with the range, a color value in
RGB is returned. Read moreSource§fn color_presentation(
&self,
params: ColorPresentationParams,
) -> impl Future<Output = Result<Vec<ColorPresentation>, Error>> + Send
fn color_presentation( &self, params: ColorPresentationParams, ) -> impl Future<Output = Result<Vec<ColorPresentation>, Error>> + Send
textDocument/colorPresentation request is sent from the client to the server to
obtain a list of presentations for a color value at a given location. Read moreSource§fn formatting(
&self,
params: DocumentFormattingParams,
) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
fn formatting( &self, params: DocumentFormattingParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
textDocument/formatting request is sent from the client to the server to format a
whole document.Source§fn range_formatting(
&self,
params: DocumentRangeFormattingParams,
) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
fn range_formatting( &self, params: DocumentRangeFormattingParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
textDocument/rangeFormatting request is sent from pub(crate) the client to the server to
format a given range in a document.Source§fn on_type_formatting(
&self,
params: DocumentOnTypeFormattingParams,
) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
fn on_type_formatting( &self, params: DocumentOnTypeFormattingParams, ) -> impl Future<Output = Result<Option<Vec<TextEdit>>, Error>> + Send
textDocument/onTypeFormatting request is sent from the client to the server to
format parts of the document during typing.Source§fn rename(
&self,
params: RenameParams,
) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
fn rename( &self, params: RenameParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
textDocument/rename request is sent from the client to the server to ask the server
to compute a workspace change so that the client can perform a workspace-wide rename of a
symbol.Source§fn prepare_rename(
&self,
params: TextDocumentPositionParams,
) -> impl Future<Output = Result<Option<PrepareRenameResponse>, Error>> + Send
fn prepare_rename( &self, params: TextDocumentPositionParams, ) -> impl Future<Output = Result<Option<PrepareRenameResponse>, Error>> + Send
textDocument/prepareRename request is sent from the client to the server to setup
and test the validity of a rename operation at a given location. Read moreSource§fn linked_editing_range(
&self,
params: LinkedEditingRangeParams,
) -> impl Future<Output = Result<Option<LinkedEditingRanges>, Error>> + Send
fn linked_editing_range( &self, params: LinkedEditingRangeParams, ) -> impl Future<Output = Result<Option<LinkedEditingRanges>, Error>> + Send
textDocument/linkedEditingRange request is sent from the client to the server to
return for a given position in a document the range of the symbol at the position and all
ranges that have the same content. Read moreSource§fn symbol_resolve(
&self,
params: WorkspaceSymbol,
) -> impl Future<Output = Result<WorkspaceSymbol, Error>> + Send
fn symbol_resolve( &self, params: WorkspaceSymbol, ) -> impl Future<Output = Result<WorkspaceSymbol, Error>> + Send
workspaceSymbol/resolve request is sent from the client to the server to resolve
additional information for a given workspace symbol. Read moreSource§fn did_change_configuration(
&self,
params: DidChangeConfigurationParams,
) -> impl Future<Output = ()> + Send
fn did_change_configuration( &self, params: DidChangeConfigurationParams, ) -> impl Future<Output = ()> + Send
workspace/didChangeConfiguration notification is sent from the client to the server
to signal the change of configuration settings.Source§fn did_change_workspace_folders(
&self,
params: DidChangeWorkspaceFoldersParams,
) -> impl Future<Output = ()> + Send
fn did_change_workspace_folders( &self, params: DidChangeWorkspaceFoldersParams, ) -> impl Future<Output = ()> + Send
workspace/didChangeWorkspaceFolders notification is sent from the client to the
server to inform about workspace folder configuration changes. Read moreSource§fn will_create_files(
&self,
params: CreateFilesParams,
) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
fn will_create_files( &self, params: CreateFilesParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
workspace/willCreateFiles request is sent from the client to the server before
files are actually created as long as the creation is triggered from within the client. Read moreSource§fn did_create_files(
&self,
params: CreateFilesParams,
) -> impl Future<Output = ()> + Send
fn did_create_files( &self, params: CreateFilesParams, ) -> impl Future<Output = ()> + Send
workspace/didCreateFiles request is sent from the client to the server when files
were created from within the client.Source§fn will_rename_files(
&self,
params: RenameFilesParams,
) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
fn will_rename_files( &self, params: RenameFilesParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
workspace/willRenameFiles request is sent from the client to the server before
files are actually renamed as long as the rename is triggered from within the client. Read moreSource§fn did_rename_files(
&self,
params: RenameFilesParams,
) -> impl Future<Output = ()> + Send
fn did_rename_files( &self, params: RenameFilesParams, ) -> impl Future<Output = ()> + Send
workspace/didRenameFiles notification is sent from the client to the server when
files were renamed from within the client.Source§fn will_delete_files(
&self,
params: DeleteFilesParams,
) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
fn will_delete_files( &self, params: DeleteFilesParams, ) -> impl Future<Output = Result<Option<WorkspaceEdit>, Error>> + Send
workspace/willDeleteFiles request is sent from the client to the server before
files are actually deleted as long as the deletion is triggered from within the client
either by a user action or by applying a workspace edit. Read moreSource§fn did_delete_files(
&self,
params: DeleteFilesParams,
) -> impl Future<Output = ()> + Send
fn did_delete_files( &self, params: DeleteFilesParams, ) -> impl Future<Output = ()> + Send
workspace/didDeleteFiles notification is sent from the client to the server when
files were deleted from within the client.Source§fn execute_command(
&self,
params: ExecuteCommandParams,
) -> impl Future<Output = Result<Option<Value>, Error>> + Send
fn execute_command( &self, params: ExecuteCommandParams, ) -> impl Future<Output = Result<Option<Value>, Error>> + Send
workspace/executeCommand request is sent from the client to the server to trigger
command execution on the server. Read moreAuto Trait Implementations§
impl Freeze for Backend
impl !RefUnwindSafe for Backend
impl Send for Backend
impl Sync for Backend
impl Unpin for Backend
impl UnsafeUnpin for Backend
impl !UnwindSafe for Backend
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more