aboutsummaryrefslogtreecommitdiff
path: root/book/src/languages.md
diff options
context:
space:
mode:
authorontley2024-02-12 01:35:25 +0000
committerGitHub2024-02-12 01:35:25 +0000
commit6a90166d0a3d8fd0e2e96e4ac8e196b2b2989760 (patch)
treee722b996e123813e2fb0f9972136fa6002ca1839 /book/src/languages.md
parentac8d1f62a126781fbac087aa374aad540dd659b1 (diff)
Add required-root-patterns for situational lsp activation (#8696)
* Added required-root-patterns for situational lsp activation using globbing * Replaced filter_map with flatten * updated book to include required-root-patterns option * fixed wrong function name for path * Added globset to helix-core. Moved globset building to config parsing. * Normalize implements AsRef * cargo fmt * Revert "cargo fmt" This reverts commit ca8ce123e8d77d2ae8ed84d5273a9b554101b0db.
Diffstat (limited to 'book/src/languages.md')
-rw-r--r--book/src/languages.md15
1 files changed, 8 insertions, 7 deletions
diff --git a/book/src/languages.md b/book/src/languages.md
index 7e49a603..e3900dca 100644
--- a/book/src/languages.md
+++ b/book/src/languages.md
@@ -122,13 +122,14 @@ languages = { typescript = [ { formatCommand ="prettier --stdin-filepath ${INPUT
These are the available options for a language server.
-| Key | Description |
-| ---- | ----------- |
-| `command` | The name or path of the language server binary to execute. Binaries must be in `$PATH` |
-| `args` | A list of arguments to pass to the language server binary |
-| `config` | LSP initialization options |
-| `timeout` | The maximum time a request to the language server may take, in seconds. Defaults to `20` |
-| `environment` | Any environment variables that will be used when starting the language server `{ "KEY1" = "Value1", "KEY2" = "Value2" }` |
+| Key | Description |
+| ---- | ----------- |
+| `command` | The name or path of the language server binary to execute. Binaries must be in `$PATH` |
+| `args` | A list of arguments to pass to the language server binary |
+| `config` | LSP initialization options |
+| `timeout` | The maximum time a request to the language server may take, in seconds. Defaults to `20` |
+| `environment` | Any environment variables that will be used when starting the language server `{ "KEY1" = "Value1", "KEY2" = "Value2" }` |
+| `required-root-patterns` | A list of `glob` patterns to look for in the working directory. The language server is started if at least one of them is found. |
A `format` sub-table within `config` can be used to pass extra formatting options to
[Document Formatting Requests](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_formatting).