Skip to content

Support CompletionItemLabel #7565

Open
Open
@matklad

Description

@matklad
/**
 * A more detailed label for a completion item.
 *
 * @since 3.17.0 - proposed state
 */
export interface CompletionItemLabel {
	/**
	 * The name of a function or variable.
	 */
	name: string;

	/**
	 * The parameters without the return type.
	 */
	parameters?: string;

	/**
	 * The fully qualified name, like package name or file path.
	 */
	qualifier?: string;

	/**
	 * The return-type of a function or type of a property/variable.
	 */
	type?: string;
}

https://github.com/matklad/rust-analyzer/blob/52005ca22c5a32441af612d07d7e9857c863117b/crates/completion/src/item.rs#L17-L74

It's unclear what is the interplay between label and detail

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-completionautocompletionE-has-instructionsIssue has some instructions and pointers to code to get startedE-mediumS-actionableSomeone could pick this issue up and work on it right now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions