(&mut self, initialization_options: Option<Value>)
| 248 | } |
| 249 | |
| 250 | async fn initialize(&mut self, initialization_options: Option<Value>) -> Result<(), LspError> { |
| 251 | let workspace_uri = path_to_uri(&self.root)?; |
| 252 | |
| 253 | let params = InitializeParams { |
| 254 | initialization_options, |
| 255 | workspace_folders: Some(vec![WorkspaceFolder { |
| 256 | uri: workspace_uri, |
| 257 | name: "workspace".to_string(), |
| 258 | }]), |
| 259 | capabilities: ClientCapabilities::default(), |
| 260 | ..Default::default() |
| 261 | }; |
| 262 | |
| 263 | let result = self |
| 264 | .request("initialize", serde_json::to_value(params)?) |
| 265 | .await?; |
| 266 | debug!(?result, "LSP initialized"); |
| 267 | |
| 268 | self.notify("initialized", Value::Null).await?; |
| 269 | |
| 270 | Ok(()) |
| 271 | } |
| 272 | |
| 273 | async fn next_id(&self) -> u64 { |
| 274 | let mut id = self.request_id.lock().await; |
no test coverage detected