lsp 0.1.0

Language Server Protocol
Documentation
//! LSP Notifications.

use crate::*;

pub trait Notification {
  const METHOD: &'static str;
  type Params: Send + serde::Serialize + serde::de::DeserializeOwned;
}

/// The `workspace/didChangeWorkspaceFolders` notification is sent from the
/// client to the server when the workspace folder configuration changes.
pub enum WorkspaceDidChangeWorkspaceFolders {}
impl Notification for WorkspaceDidChangeWorkspaceFolders {
  const METHOD: &'static str = "workspace/didChangeWorkspaceFolders";
  type Params = DidChangeWorkspaceFoldersParams;
}
/// The `window/workDoneProgress/cancel` notification is sent from  the client
/// to the server to cancel a progress initiated on the server side.
pub enum WindowWorkDoneProgressCancel {}
impl Notification for WindowWorkDoneProgressCancel {
  const METHOD: &'static str = "window/workDoneProgress/cancel";
  type Params = WorkDoneProgressCancelParams;
}
/// The did create files notification is sent from the client to the server when
/// files were created from within the client.
///
/// @since 3.16.0
pub enum WorkspaceDidCreateFiles {}
impl Notification for WorkspaceDidCreateFiles {
  const METHOD: &'static str = "workspace/didCreateFiles";
  type Params = CreateFilesParams;
}
/// The did rename files notification is sent from the client to the server when
/// files were renamed from within the client.
///
/// @since 3.16.0
pub enum WorkspaceDidRenameFiles {}
impl Notification for WorkspaceDidRenameFiles {
  const METHOD: &'static str = "workspace/didRenameFiles";
  type Params = RenameFilesParams;
}
/// The will delete files 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.
///
/// @since 3.16.0
pub enum WorkspaceDidDeleteFiles {}
impl Notification for WorkspaceDidDeleteFiles {
  const METHOD: &'static str = "workspace/didDeleteFiles";
  type Params = DeleteFilesParams;
}
/// A notification sent when a notebook opens.
///
/// @since 3.17.0
pub enum NotebookDocumentDidOpen {}
impl Notification for NotebookDocumentDidOpen {
  const METHOD: &'static str = "notebookDocument/didOpen";
  type Params = DidOpenNotebookDocumentParams;
}
pub enum NotebookDocumentDidChange {}
impl Notification for NotebookDocumentDidChange {
  const METHOD: &'static str = "notebookDocument/didChange";
  type Params = DidChangeNotebookDocumentParams;
}
/// A notification sent when a notebook document is saved.
///
/// @since 3.17.0
pub enum NotebookDocumentDidSave {}
impl Notification for NotebookDocumentDidSave {
  const METHOD: &'static str = "notebookDocument/didSave";
  type Params = DidSaveNotebookDocumentParams;
}
/// A notification sent when a notebook closes.
///
/// @since 3.17.0
pub enum NotebookDocumentDidClose {}
impl Notification for NotebookDocumentDidClose {
  const METHOD: &'static str = "notebookDocument/didClose";
  type Params = DidCloseNotebookDocumentParams;
}
/// The initialized notification is sent from the client to the
/// server after the client is fully initialized and the server
/// is allowed to send requests from the server to the client.
pub enum Initialized {}
impl Notification for Initialized {
  const METHOD: &'static str = "initialized";
  type Params = InitializedParams;
}
/// The exit event is sent from the client to the server to
/// ask the server to exit its process.
pub enum Exit {}
impl Notification for Exit {
  const METHOD: &'static str = "exit";
  type Params = ();
}
/// The configuration change notification is sent from the client to the server
/// when the client's configuration has changed. The notification contains
/// the changed configuration as defined by the language client.
pub enum WorkspaceDidChangeConfiguration {}
impl Notification for WorkspaceDidChangeConfiguration {
  const METHOD: &'static str = "workspace/didChangeConfiguration";
  type Params = DidChangeConfigurationParams;
}
/// The show message notification is sent from a server to a client to ask
/// the client to display a particular message in the user interface.
pub enum WindowShowMessage {}
impl Notification for WindowShowMessage {
  const METHOD: &'static str = "window/showMessage";
  type Params = ShowMessageParams;
}
/// The log message notification is sent from the server to the client to ask
/// the client to log a particular message.
pub enum WindowLogMessage {}
impl Notification for WindowLogMessage {
  const METHOD: &'static str = "window/logMessage";
  type Params = LogMessageParams;
}
/// The telemetry event notification is sent from the server to the client to
/// ask the client to log telemetry data.
pub enum TelemetryEvent {}
impl Notification for TelemetryEvent {
  const METHOD: &'static str = "telemetry/event";
  type Params = Value;
}
/// The document open notification is sent from the client to the server to
/// signal newly opened text documents. The document's truth is now managed by
/// the client and the server must not try to read the document's truth using
/// the document's uri. Open in this sense means it is managed by the client. It
/// doesn't necessarily mean that its content is presented in an editor. An open
/// notification must not be sent more than once without a corresponding close
/// notification send before. This means open and close notification must be
/// balanced and the max open count is one.
pub enum TextDocumentDidOpen {}
impl Notification for TextDocumentDidOpen {
  const METHOD: &'static str = "textDocument/didOpen";
  type Params = DidOpenTextDocumentParams;
}
/// The document change notification is sent from the client to the server to
/// signal changes to a text document.
pub enum TextDocumentDidChange {}
impl Notification for TextDocumentDidChange {
  const METHOD: &'static str = "textDocument/didChange";
  type Params = DidChangeTextDocumentParams;
}
/// The document close notification is sent from the client to the server when
/// the document got closed in the client. The document's truth now exists where
/// the document's uri points to (e.g. if the document's uri is a file uri the
/// truth now exists on disk). As with the open notification the close
/// notification is about managing the document's content. Receiving a close
/// notification doesn't mean that the document was open in an editor before. A
/// close notification requires a previous open notification to be sent.
pub enum TextDocumentDidClose {}
impl Notification for TextDocumentDidClose {
  const METHOD: &'static str = "textDocument/didClose";
  type Params = DidCloseTextDocumentParams;
}
/// The document save notification is sent from the client to the server when
/// the document got saved in the client.
pub enum TextDocumentDidSave {}
impl Notification for TextDocumentDidSave {
  const METHOD: &'static str = "textDocument/didSave";
  type Params = DidSaveTextDocumentParams;
}
/// A document will save notification is sent from the client to the server
/// before the document is actually saved.
pub enum TextDocumentWillSave {}
impl Notification for TextDocumentWillSave {
  const METHOD: &'static str = "textDocument/willSave";
  type Params = WillSaveTextDocumentParams;
}
/// The watched files notification is sent from the client to the server when
/// the client detects changes to file watched by the language client.
pub enum WorkspaceDidChangeWatchedFiles {}
impl Notification for WorkspaceDidChangeWatchedFiles {
  const METHOD: &'static str = "workspace/didChangeWatchedFiles";
  type Params = DidChangeWatchedFilesParams;
}
/// Diagnostics notification are sent from the server to the client to signal
/// results of validation runs.
pub enum TextDocumentPublishDiagnostics {}
impl Notification for TextDocumentPublishDiagnostics {
  const METHOD: &'static str = "textDocument/publishDiagnostics";
  type Params = PublishDiagnosticsParams;
}
pub enum SetTrace {}
impl Notification for SetTrace {
  const METHOD: &'static str = "$/setTrace";
  type Params = SetTraceParams;
}
pub enum LogTrace {}
impl Notification for LogTrace {
  const METHOD: &'static str = "$/logTrace";
  type Params = LogTraceParams;
}
pub enum CancelRequest {}
impl Notification for CancelRequest {
  const METHOD: &'static str = "$/cancelRequest";
  type Params = CancelParams;
}
pub enum Progress {}
impl Notification for Progress {
  const METHOD: &'static str = "$/progress";
  type Params = ProgressParams;
}