Closed Tangent-90 closed 11 months ago
There's two ways to display conpletions label, one is like "AA.BB.CC" and another is "CC (AA.BB)".
When the full name is long, comparing to the second display way, the first one seems to be too messy, and can't quickly distinguish member's name.
So completions label is decided to display like "CC (AA.BB)".
To enter part of the full name to filter completion items, the filter text must contain its full name "AA.BB.CC".
As completions member name was the first part of the label, to make it first filter out by member name, and to make filtered label highlighted correctly by editors, the name must to be the first part of the filter text.
As the result, the format of filter text is member name + full name, which is "CCAA.BB.CC".
Thanks @Tangent-90 - that helps me understand the intent quite a bit more!
Pushed a tiny change to add more to the docs so it was clearer to me personally, but otherwise this LGTM and let's ship it! Ideally we could also add the option to the Ionide package.json so that end users have some docs for it.
WHAT
π€ Generated by Copilot at b053be9
This pull request adds a new feature to the F# language server, which allows the user to configure how completion items for external symbols are displayed. It also improves the completion items for hash directives and keywords, and adds tests for the new feature. The main files affected are
src/FsAutoComplete.Core/KeywordList.fs
,src/FsAutoComplete/LspHelpers.fs
,src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs
, andtest/FsAutoComplete.Tests.Lsp/CompletionTests.fs
.π€ Generated by Copilot at b053be9
π§βπ»π§π§ͺ
WHY
Array.map
"Before:
After:
Before:
After:
FullNameExternalAutocomplete
Before:
With
FullNameExternalAutocomplete
:HOW
π€ Generated by Copilot at b053be9
getCodeToInsert
function and thedata
field of the completion items (link, link, link, link, link, link)label
field and adata
field to the completion items for hash directives and keywords, using the#
prefix for directives (link, link, link)fullNameExternalAutocompleteTest
function and theRange.FullNameExternalAutocomplete
field (link, link)