summaryrefslogtreecommitdiff
path: root/cli/lsp/README.md
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-02-18 15:37:05 +1100
committerGitHub <noreply@github.com>2021-02-18 15:37:05 +1100
commit2225e83da2d118678e3df1e2801af195166bc65a (patch)
tree0d33bdf77e19872a72fca4364281c6cc14ec5724 /cli/lsp/README.md
parent78e34d49120d8cc2583d8d6d28ae9b74f9765533 (diff)
fix(lsp): handle data URLs properly (#9522)
Fixes #9514 Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Diffstat (limited to 'cli/lsp/README.md')
-rw-r--r--cli/lsp/README.md35
1 files changed, 30 insertions, 5 deletions
diff --git a/cli/lsp/README.md b/cli/lsp/README.md
index c43590f60..a32deb585 100644
--- a/cli/lsp/README.md
+++ b/cli/lsp/README.md
@@ -22,13 +22,38 @@ implement these in order to have a fully functioning client that integrates well
with Deno:
- `deno/cache` - This command will instruct Deno to attempt to cache a module
- and all of its dependencies. It expects an argument of
- `{ textDocument: TextDocumentIdentifier }` to be passed.
+ and all of its dependencies. If a `referrer` only is passed, then all
+ dependencies for the module specifier will be loaded. If there are values in
+ the `uris`, then only those `uris` will be cached.
+
+ It expects parameters of:
+
+ ```ts
+ interface CacheParams {
+ referrer: TextDocumentIdentifier;
+ uris: TextDocumentIdentifier[];
+ }
+ ```
- `deno/performance` - Requests the return of the timing averages for the
internal instrumentation of Deno.
+
+ It does not expect any parameters.
- `deno/virtualTextDocument` - Requests a virtual text document from the LSP,
which is a read only document that can be displayed in the client. This allows
clients to access documents in the Deno cache, like remote modules and
- TypeScript library files built into Deno. It also supports a special URL of
- `deno:/status.md` which provides a markdown formatted text document that
- contains details about the status of the LSP for display to a user.
+ TypeScript library files built into Deno. The Deno language server will encode
+ all internal files under the custom schema `deno:`, so clients should route
+ all requests for the `deno:` schema back to the `deno/virtualTextDocument`
+ API.
+
+ It also supports a special URL of `deno:/status.md` which provides a markdown
+ formatted text document that contains details about the status of the LSP for
+ display to a user.
+
+ It expects parameters of:
+
+ ```ts
+ interface VirtualTextDocumentParams {
+ textDocument: TextDocumentIdentifier;
+ }
+ ```