Skip to content
This repository has been archived by the owner on Dec 17, 2018. It is now read-only.

Implement workspace/symbol request and response for the language server #5

Open
RLovelett opened this issue Oct 30, 2016 · 0 comments

Comments

@RLovelett
Copy link
Owner

RLovelett commented Oct 30, 2016

SourceKit

Request

{
  key.request: source.request.indexer.srv.symbol-contains,
  key.indexer.arg.indexer-token: 1,
  key.indexer.arg.symbol.name: "ar",
  key.indexer.arg.symbol.is-anchor-start: false,
  key.indexer.arg.symbol.is-anchor-end: false,
  key.indexer.arg.symbol.is-subsequence: false,
  key.indexer.arg.symbol.is-ignore-case: true
}

Response

{
  key.symbols: [
    {
      key.symbol: {
        key.indexer.arg.symbol.name: "Bar",
        key.indexer.arg.symbol.kind: "Xcode.SourceCodeSymbolKind.Swift.Struct",
        key.indexer.arg.symbol.language: "Xcode.SourceCodeLanguage.Swift",
        key.indexer.arg.symbol.resolution: "s:V4Test3Bar"
      },
      key.indexer.arg.occurrence.role: 2,
      key.indexer.arg.occurrence.location: {
        key.indexer.arg.doc-loc.url: "file:///Users/ryan/Desktop/Test/Sources/bar.swift",
        key.indexer.arg.doc-loc.start-line: 0,
        key.indexer.arg.doc-loc.start-col: 7,
        key.indexer.arg.doc-loc.end-line: 0,
        key.indexer.arg.doc-loc.end-col: 7,
        key.indexer.arg.doc-loc.range-loc: 9223372036854775807,
        key.indexer.arg.doc-loc.range-count: 0,
        key.indexer.arg.doc-loc.time-stamp: 4.994871e+08,
        key.indexer.arg.doc-loc.encoding: 0
      },
      key.indexer.arg.occurrence.line: 1,
      key.indexer.arg.occurrence.col: 8,
      key.indexer.arg.occurrence.file: "/Users/ryan/Desktop/Test/Sources/bar.swift",
      key.indexer.arg.symbol.display-name: "Bar",
      key.indexer.arg.symbol.qualified-display-name: "Bar",
      key.indexer.arg.symbol.is-in-project: true,
      key.indexer.arg.symbol.is-virtual: false,
      key.indexer.arg.symbol.is-system: false
    },
   ...
}

I've attached a log of Xcode performing the same operation using SourceKit.
workspace-symbol.txt

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant