Skip to content

Do not offer jump-to-definition for literals #2368

@ahoppen

Description

@ahoppen

swiftlang/swift#67613 added cursor info support to be able to inspect the type of a literal using Hover. This also implicitly added jump-to-definition support for those literals, which probably isn’t useful in most cases and causes issues. We should probably suppress jump-to-definition for literals either by:

  • Looking at the syntax tree of Swift files and not returning jump-to-definition if the requested position is a literal
  • Adding a field to the sourcekitd response for literals that can be picked up by SourceKit-LSP to suppress jump-to-definition for it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions