You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
label (sortText)
---------------
test (0-test)
tes (1-tes)
If user types tes, both completion items appear but tes, as an exact match of current input, ranks higher than test even though test should rank higher in terms of its sortText.
where | stands for the cursor. While there's a function named rep, we actually want sample's argument replace to always rank higher than other symbols in this case.
In fact, we want to implement a principle to give different priorities to different category of completion items: from local to global. Is there a way we could ensure that some completion items always rank higher than others even if the current token under cursor has an exact match (which is in most cases not desired)?
The completion items provider of a language server could specify
CompletionItem.sortText
(as defined in https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_completion) to adjust the order of completion items. However, exact match in the completion list overrides the ordering specified byCompletionItem.sortText
.For example, the completion items are
If user types
tes
, both completion items appear buttes
, as an exact match of current input, ranks higher thantest
even thoughtest
should rank higher in terms of itssortText
.Related:
The text was updated successfully, but these errors were encountered: