From 16e13b9789359282cb6c2681262f46fb1b70134b Mon Sep 17 00:00:00 2001 From: TotalKrill Date: Fri, 9 Dec 2022 05:09:23 +0100 Subject: allow specifying environment for language servers in language.toml (#4004) Signed-off-by: Stephen Wakely Co-authored-by: Stephen Wakely Co-authored-by: Blaž Hrastnik --- book/src/languages.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'book/src') 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 -- cgit v1.2.3-70-g09d2