swiftlang / vscode-swift

Visual Studio Code Extension for Swift
https://marketplace.visualstudio.com/items?itemName=sswg.swift-lang
Apache License 2.0
753 stars 54 forks source link

Inlay hints preferences aren't taken into account with Swift 5.7 #344

Closed PopFlamingo closed 2 years ago

PopFlamingo commented 2 years ago

Describe the bug When using Swift 5.7, disabling inlay hints doesn't seem to work (tested in a Linux container), so they are always displayed.

Environment

Additional context In my quick tests it seemed to work fine with older Swift versions

adam-fowler commented 2 years ago

Inlay hints and Swift 5.7 are in a state of flux at the moment as we are in the process of moving across to the official LSP spec version of Inlay hints which is now used in VSCode. SourceKit-LSP 5.7 is now generating the official spec Inlay Hints which VSCode picks up automatically. But we still have the old system running as well. We need to release a new version of the extension which disables the old Inlay Hints for Swift 5.7 and above.

The official Inlay Hints display is controlled by VSCode setting Editor › Inlay Hints. It has some nice options where you can display the Inlay hints temporarily when a key is pressed.

PopFlamingo commented 2 years ago

@adam-fowler Thank you! I didn't know VS Code had something specific its its extension API to make these settings more global.

adam-fowler commented 2 years ago

Closing as v0.7.0 adds comment pointing to correct option.