diff options
author | TotalKrill | 2022-12-09 04:09:23 +0000 |
---|---|---|
committer | GitHub | 2022-12-09 04:09:23 +0000 |
commit | 16e13b9789359282cb6c2681262f46fb1b70134b (patch) | |
tree | 9332f833c85fb66d0109ce95ef683655a44516c2 /book/src | |
parent | 2ea20a23e26a771e095972bdda673d491b4aacc5 (diff) |
allow specifying environment for language servers in language.toml (#4004)
Signed-off-by: Stephen Wakely <fungus.humungus@gmail.com>
Co-authored-by: Stephen Wakely <fungus.humungus@gmail.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Diffstat (limited to 'book/src')
-rw-r--r-- | book/src/languages.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/book/src/languages.md b/book/src/languages.md index 133e6447..e45ef910 100644 --- a/book/src/languages.md +++ b/book/src/languages.md @@ -39,7 +39,7 @@ injection-regex = "^mylang$" file-types = ["mylang", "myl"] comment-token = "#" indent = { tab-width = 2, unit = " " } -language-server = { command = "mylang-lsp", args = ["--stdio"] } +language-server = { command = "mylang-lsp", args = ["--stdio"], environment = { "ENV1" = "value1", "ENV2" = "value2" } } formatter = { command = "mylang-formatter" , args = ["--stdin"] } ``` @@ -99,6 +99,7 @@ The `language-server` field takes the following keys: | `args` | A list of arguments to pass to the language server binary | | `timeout` | The maximum time a request to the language server may take, in seconds. Defaults to `20` | | `language-id` | The language name to pass to the language server. Some language servers support multiple languages and use this field to determine which one is being served in a buffer | +| `environment` | Any environment variables that will be used when starting the language server `{ "KEY1" = "Value1", "KEY2" = "Value2" }` | The top-level `config` field is used to configure the LSP initialization options. A `format` sub-table within `config` can be used to pass extra formatting options to |