Uploaded image for project: 'Swift'
  1. Swift
  2. SR-10808

Implement textDocument/implementation request

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: SourceKit-LSP
    • Labels:

      Description

      Implement the textDocument/implementation request, which given a source location, resolves the symbol at that location, and returns the implementations of a given protocol, or protocol requirement.

      https://microsoft.github.io/language-server-protocol/specification#textDocument_implementation

      To implement this, you can start by looking at how jump to definition (textDocument/definition) resolves the symbol under the cursor, but instead of looking for its definition, look for all symbols that have a base relation with it (to find types that implement a protocol) or override relation (to find methods/properties that implement a protocol requirement). All of the database query methods to do this should already exist in indexstore-db's C++ code, although you may need to expose them in the Swift wrapper.

        Attachments

          Activity

            People

            Assignee:
            cukier cukr
            Reporter:
            benlangmuir Ben Langmuir
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: