Document "any-typed" (`serde_json::Value`) "lsp" keys to include them in json-language-server completions. The vscode-json-languageserver seems to skip generically typed keys when offering completion. For this schema ``` "LspSettings": { "type": "object", "properties": { ... "initialization_options": true, ... } } ``` "initialization_options" is not offered in the completion. The effect is easy to verify by triggering completion inside: ``` "lsp": { "basedpyright": { COMPLETE HERE ``` <img width="797" height="215" alt="image" src="https://github.com/user-attachments/assets/d1d1391c-d02c-4028-9888-8869f4d18b0f" /> By adding a documentation string the keys are offered even if they are generically typed: <img width="809" height="238" alt="image" src="https://github.com/user-attachments/assets/9a072da9-961b-4e15-9aec-3d56933cbe67" /> --- Note: I did some cursory research of whether it's possible to make vscode-json-languageserver change behavior without success. IMO, not offering completions here is a bug (or at minimal should be configurable) --- Release Notes: - N/A ---------
Unified · Split
| @@ -26,6 +26,7 @@ pub struct ProjectSettingsContent { · 25 unmodified lines | ||
| 26 | 26 | /// The following settings can be overridden for specific language servers: |
| 27 | 27 | /// - initialization_options |
| 28 | 28 | /// |
| 29 | + /// | |
| 29 | 30 | /// To override settings for a language, add an entry for that language server's |
| 30 | 31 | /// name to the lsp value. |
| 31 | 32 | /// Default: null |
| @@ -108,7 +109,19 @@ pub struct WorktreeSettingsContent { · 76 unmodified lines | ||
| 108 | 109 | #[serde(rename_all = "snake_case")] |
| 109 | 110 | pub struct LspSettings { |
| 110 | 111 | pub binary: Option<BinarySettings>, |
| 112 | + /// Options passed to the language server at startup. | |
| 113 | + /// | |
| 114 | + /// Ref: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize | |
| 115 | + /// | |
| 116 | + /// Consult the documentation for the specific language server to see what settings | |
| 117 | + /// are supported. | |
| 111 | 118 | pub initialization_options: Option<serde_json::Value>, |
| 119 | + /// Language server settings. | |
| 120 | + /// | |
| 121 | + /// Ref: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_configuration | |
| 122 | + /// | |
| 123 | + /// Consult the documentation for the specific LSP to see what settings | |
| 124 | + /// are supported. | |
| 112 | 125 | pub settings: Option<serde_json::Value>, |
| 113 | 126 | /// If the server supports sending tasks over LSP extensions, |
| 114 | 127 | /// this setting can be used to enable or disable them in Zed. |