posit-dev / posit-dev/positron
Ark: Work with roxygen2 to be able to mark completions as `Deprecated`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 206
Description
i.e. using this from the LSP Spec https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemTag
/**
* Completion item tags are extra annotations that tweak the rendering of a
* completion item.
*
* @since 3.15.0
*/
export namespace [CompletionItemTag](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemTag) {
/**
* Render a completion as obsolete, usually using a strike-out.
*/
export const Deprecated = 1;
}
Ive seen this used in Typescript completions before. Its pretty cool because the completion shows up grey with a strike out, but can still show you the documentation which often tells you what to use instead.
We'd probably add a new @lifecycle tag to roxygen2? Or maybe use the declare() syntax somehow. The exact way to add the metadata is a little uncertain. A @lifecycle tag might be hard because it would apply to all functions on that topic page, which might not be right.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the LSP CompletionItemTag specification and roxygen2's available metadata mechanisms; the issue names no files or tests. Determine how deprecated completion metadata can be attached without affecting unrelated functions, then verify that deprecated items are struck through while their documentation remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100