From 68836c0dbe54de481c4534d95e1c5b06521778b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 30 Jul 2021 16:30:04 +0300 Subject: [PATCH] minor: drop impl-specific stuff from lsp docs The lc. prefix is a copy-paste from our typescript code, it doesn't make sense in the impl-agnostic docs. --- docs/dev/lsp-extensions.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index e617153a6c..1fb5237ba7 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md @@ -275,9 +275,9 @@ interface SsrParams { parseOnly: bool, /// The current text document. This and `position` will be used to determine in what scope /// paths in `query` should be resolved. - textDocument: lc.TextDocumentIdentifier; + textDocument: TextDocumentIdentifier; /// Position where SSR was invoked. - position: lc.Position; + position: Position; } ``` @@ -664,15 +664,15 @@ interface TestInfo { **Experimental Server Capability:** { "hoverRange": boolean } -This request build upon the current `textDocument/hover` to show the type of the expression currently selected. +This extension allows passing a `Range` as a `position` field of `HoverParams`. +The primary use-case is to use the hover request to show the type of the expression currently selected. ```typescript -interface HoverParams extends lc.WorkDoneProgressParams { - textDocument: lc.TextDocumentIdentifier; - position: lc.Range | lc.Position; +interface HoverParams extends WorkDoneProgressParams { + textDocument: TextDocumentIdentifier; + position: Range | Position; } ``` - Whenever the client sends a `Range`, it is understood as the current selection and any hover included in the range will show the type of the expression if possible. ### Example @@ -699,8 +699,8 @@ This request is sent from client to server to move item under cursor or selectio ```typescript export interface MoveItemParams { - textDocument: lc.TextDocumentIdentifier, - range: lc.Range, + textDocument: TextDocumentIdentifier, + range: Range, direction: Direction }