summaryrefslogtreecommitdiff
path: root/cli/lsp/lsp_extensions.rs
blob: eb0a62464d4977466c83b42022d74e598078ff08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.

///!
///! Extensions to the language service protocol that are specific to Deno.
///!
use deno_core::serde::Deserialize;
use deno_core::serde::Serialize;
use lsp_types::request::Request;
use lsp_types::TextDocumentIdentifier;

#[derive(Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct VirtualTextDocumentParams {
  pub text_document: TextDocumentIdentifier,
}

/// Request a _virtual_ text document from the server. Used for example to
/// provide a status document of the language server which can be viewed in the
/// IDE.
pub enum VirtualTextDocument {}

impl Request for VirtualTextDocument {
  type Params = VirtualTextDocumentParams;
  type Result = String;
  const METHOD: &'static str = "deno/virtualTextDocument";
}