-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
C-enhancementCategory: ImprovementsCategory: Improvements
Description
It would be nice to support the label details feature that is implemented since LSP 3.17.
Right now, for autocompletions that add auto-imports, there is no way to tell which symbol is to select for importing:

I can see extra details in the LSP logs:
{
"additionalTextEdits": [
{
"newText": "from selectolax.parser import HTMLParser\n",
"range": { "end": { "character": 0, "line": 7 }, "start": { "character": 0, "line": 7 } }
}
],
"insertText": "HTMLParser",
"kind": 7,
"label": "HTMLParser",
"labelDetails": { "detail": " (import selectolax.parser)" },
"sortText": " 56"
},
{
"additionalTextEdits": [
{
"newText": "from html.parser import HTMLParser\n",
"range": { "end": { "character": 0, "line": 7 }, "start": { "character": 0, "line": 7 } }
}
],
"insertText": "HTMLParser",
"kind": 7,
"label": "HTMLParser",
"labelDetails": { "detail": " (import html.parser)" },
"sortText": " 57"
},
They usually go next to suggestions, similar to how symbol kind is displayed in Rust Analyzer:

Metadata
Metadata
Assignees
Labels
C-enhancementCategory: ImprovementsCategory: Improvements