5 Commits

Author SHA1 Message Date
loveucifer
81610b3665 Simplify InlayHintResolveData using Position LSPAnyCodable 2026-01-11 16:52:41 +05:30
loveucifer
3630ab970c Address review feedback for inlay hint go-to-definition
- Use cursorInfo USR lookup instead of index (more accurate)
- Add document version tracking to reject stale resolve requests
- Make InlayHintResolveData conform to LSPAnyCodable
- Reference swiftlang/swift#86432 for mangled type workaround
- cursorInfoFromTypeUSR takes DocumentSnapshot for version safety
- Remove TypeDefinition.swift (defer to follow-up PR)
- Remove unnecessary comments
- Tests work without index
2026-01-10 07:00:43 +05:30
loveucifer
8e300ee443 add go-to-definition for inlay hints (#2318)
Implements resolveProvider for inlay hints to enable navigating to type
definitions. When an inlay hint showing a type is resolved, the server
looks up the type's definition location using cursorInfo and the index.

- store variable position in InlayHint.data for resolution
- add inlayHintResolve to LanguageService protocol
- implement resolve handler using cursorInfo and index lookup
- enable resolveProvider: true in capabilities
- add test for resolve functionality

Addresses #2318
2026-01-06 19:35:06 +05:30
Owen Voorhees
f04b971726 Adopt swift-tools-protocols 2025-10-31 14:11:11 -07:00
Alex Hoppen
2ad02363a3 Show inlay hints of #if conditions at their corresponding #endif directives
Fixes #2221
2025-10-13 16:35:05 +02:00