redhat-developer / redhat-developer/vscode-java

Pass the function signature in the detail property of the completion item instead of the label

Open
#685 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

content-assist enhancement help wanted signature help
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

Based on the gif in the README and the snapshots in https://github.com/Microsoft/vscode/issues/29126#issuecomment-432262123, it looks like this extension is appending the function signature to the function name in the label of the completion item.

This makes the reading of the items hard, especially when the docs are expanded to the side (Hit Ctrl+Space to show/hide the docs once the suggest widget is open)

The CompletionItem has a property called detail. Most extensions use this property to pass the signature. Below is a typsescript example:

image

image

I understand the temptation to include the signature as part of the label. It allows the user to choose the right item from the list at a glance. But this is only possible when the function name is small and docs are collapsed. Else, it just adds noise

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where this extension constructs VS Code CompletionItem objects, using the CompletionItem API documentation and the completion UI shown in the issue. Move the function signature from the item label to its detail property, then verify with Ctrl+Space that labels are cleaner while the signature remains visible in the expanded documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.