Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completion of symbols in current module #14

Open
wiruzx opened this issue Dec 7, 2015 · 1 comment
Open

Completion of symbols in current module #14

wiruzx opened this issue Dec 7, 2015 · 1 comment
Labels

Comments

@wiruzx
Copy link

wiruzx commented Dec 7, 2015

import Foundation

let x = "Hello"

func test(x: String) -> String {
    return x + " World"
}

let y = te // Completion doesn't work

But if we write

let y = Temp.te // Completion works perfectly

where Temp is module name

@nathankot nathankot added the bug label Dec 8, 2015
@nathankot
Copy link
Owner

It seems that just like #13 it's running into an issue where sourcekit returns never-ending gibberish for completions that don't have a . or ( or import.

I'm not sure if it's because we're sending the wrong offset to sourcekit or if sourcekittendaemon is sending the wrong flags.

This is how it currently works:

let y = te|
#         ^ Offset: 11, Prefix: ""
#           Results: gibberish

It probably should work like this but even after manually sending the offset it's still getting gibberish:

let y = |te
#       ^ Offset: 9, Prefix: "te"
#         Results: gibberish

I've tried to see how XCode does it using export SOURCEKIT_LOGGING=3 && /Applications/Xcode.app/Contents/MacOS/Xcode but things were too slow with the logging on and I've run out of time today :)

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

No branches or pull requests

2 participants