Autocompletion of SPM dependencies and go to definition info
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 2.4k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
Hi! I'm just started looking into Swift and, as a part of learning process, I'm trying to configure my editor so it can use some toolchain features. I don't want to use Xcode for a number of reasons, so I'm hacking on Atom.
My first goals are:
- Setup proper autocompletion.
- Implement go to definition functionality.
I use nuclide to write JS/Reason code and I tried its Swift integration. It works great when I operate in the scope of my own code. But when I add dependency and build the project—it builds, but autocompletion doesn't work b/c sourcekitten cli returns empty array (it doesn't see external modules). I also tried --spm-module MyPackage flag, but received empty array as well. Should I do something special to make it work or add something to Package.swift? Or it's out of scope of SourceKitten and I should go lower?
On the second item in my list, tbh I haven't looked much into it yet, but I'd be grateful for some directions or even keywords b/c I kinda wander in the dark now.
Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the empty autocompletion result with SourceKitten’s CLI against a Swift Package Manager dependency, including the --spm-module MyPackage case. Read the project’s Package.swift handling and the SourceKitten entry points involved in completion and definition lookup. Done means the scope is defined and dependency completion and go-to-definition behavior are implemented or documented with a clear limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli, devtools
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100