feat(lsp): add description in TaskDefinition (#29244)

This commit is contained in:
narumincho 2025-05-13 07:33:38 +09:00 committed by GitHub
parent 1b36304381
commit 2f876b52d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 0 deletions

View file

@ -4755,6 +4755,7 @@ impl Inner {
command: def.command.clone(),
source_uri: url_to_uri(&config_file.specifier)
.map_err(|_| LspError::internal_error())?,
description: def.description.clone(),
});
}
};
@ -4767,6 +4768,7 @@ impl Inner {
command: Some(command.clone()),
source_uri: url_to_uri(&package_json.specifier())
.map_err(|_| LspError::internal_error())?,
description: None,
});
}
}

View file

@ -15,6 +15,7 @@ pub const LATEST_DIAGNOSTIC_BATCH_INDEX: &str =
pub struct TaskDefinition {
pub name: String,
pub command: Option<String>,
pub description: Option<String>,
pub source_uri: lsp::Uri,
}

View file

@ -1295,11 +1295,13 @@ fn lsp_deno_task() {
{
"name": "build",
"command": "deno test",
"description": null,
"sourceUri": url_to_uri(&temp_dir.url().join("deno.jsonc").unwrap()).unwrap(),
},
{
"name": "serve",
"command": "deno run -RN server.ts",
"description": "Start the dev server",
"sourceUri": url_to_uri(&temp_dir.url().join("deno.jsonc").unwrap()).unwrap(),
}
])