summaryrefslogtreecommitdiff
path: root/cli/lsp/README.md
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2021-05-10 11:16:04 +1000
committerGitHub <noreply@github.com>2021-05-10 11:16:04 +1000
commit84733d90c7cf9b6768acf78f4204b2293f2d1bc0 (patch)
tree77b46b8c22a441895205d8898bb27a41c20bdf51 /cli/lsp/README.md
parent33b1a6ed617a9e3f9448d6699f6fca8af7330c80 (diff)
feat: support workspace folders configuration (#10488)
Ref #8643
Diffstat (limited to 'cli/lsp/README.md')
-rw-r--r--cli/lsp/README.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/cli/lsp/README.md b/cli/lsp/README.md
index 11464efd2..d480e3133 100644
--- a/cli/lsp/README.md
+++ b/cli/lsp/README.md
@@ -61,3 +61,56 @@ with Deno:
textDocument: TextDocumentIdentifier;
}
```
+
+## Settings
+
+There are several settings that the language server supports for a workspace:
+
+- `deno.enable`
+- `deno.config`
+- `deno.import_map`
+- `deno.code_lens.implementations`
+- `deno.code_lens.references`
+- `deno.code_lens.references_all_functions`
+- `deno.suggest.complete_function_calls`
+- `deno.suggest.names`
+- `deno.suggest.paths`
+- `deno.suggest.auto_imports`
+- `deno.imports.hosts`
+- `deno.lint`
+- `deno.unstable`
+
+There are settings that are support on a per resource basis by the language
+server:
+
+- `deno.enable`
+
+There are several points in the process where Deno analyzes these settings.
+First, when the `initialize` request from the client, the
+`initializationOptions` will be assumed to be an object that represents the
+`deno` namespace of options. For example, the following value:
+
+```json
+{
+ "enable": true,
+ "unstable": true
+}
+```
+
+Would enable Deno with the unstable APIs for this instance of the language
+server.
+
+When the language server receives a `workspace/didChangeConfiguration`
+notification, it will assess if the client has indicated if it has a
+`workspaceConfiguration` capability. If it does, it will send a
+`workspace/configuration` request which will include a request for the workspace
+configuration as well as the configuration of all URIs that the language server
+is currently tracking.
+
+If the client has the `workspaceConfiguration` capability, the language server
+will send a configuration request for the URI when it received the
+`textDocument/didOpen` notification in order to get the resources specific
+settings.
+
+If the client does not have the `workspaceConfiguration` capability, the
+language server will assume the workspace setting applies to all resources.