swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.32k stars 276 forks source link

CompletionItem sortText is not set #1234

Open adam-fowler opened 5 months ago

adam-fowler commented 5 months ago

Swift version

Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)

Platform

macOS

Editor

VSCode

Does the issue reproduce with Swift 6?

None

Description

The CompletionItems returned by SourceKIt-LSP in a textDocument/completion response do not include a sortText field. Because of this VSCode sorts them by label. If SourceKit-LSP wants to ensure the sorting of symbols it should include something in sortText field.

Steps to Reproduce

No response

Logging

No response

ahoppen commented 5 months ago

Synced to Apple’s issue tracker as rdar://118089327