@@ -286,6 +286,13 @@ pub fn apply_document_resource_op(op: &lsp::ResourceOp) -> std::io::Result<()> {
286 if ignore_if_exists && path.exists() {
286 if ignore_if_exists && path.exists() {
289+ // Create directory if it does not exist
290+ if let Some(dir) = path.parent() {
292+ fs::create_dir_all(&dir)?;
289 fs::write(&path, [])
296 fs::write(&path, [])