diff options
| author | Kitson Kelly <me@kitsonkelly.com> | 2020-12-07 21:46:39 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-07 21:46:39 +1100 |
| commit | 301d3e4b6849d24154ac2d65c00a9b30223d000e (patch) | |
| tree | ab3bc074493e6c9be8d1875233bc141bdc0da3b4 /cli/lsp/lsp_extensions.rs | |
| parent | c8e9b2654ec0d54c77bb3f49fa31c3986203d517 (diff) | |
feat: add mvp language server (#8515)
Resolves #8400
Diffstat (limited to 'cli/lsp/lsp_extensions.rs')
| -rw-r--r-- | cli/lsp/lsp_extensions.rs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/cli/lsp/lsp_extensions.rs b/cli/lsp/lsp_extensions.rs new file mode 100644 index 000000000..eb0a62464 --- /dev/null +++ b/cli/lsp/lsp_extensions.rs @@ -0,0 +1,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"; +} |
