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

Doesn't actually use sourcekittendaemon #2

Open
brendanjerwin opened this issue Apr 13, 2016 · 5 comments
Open

Doesn't actually use sourcekittendaemon #2

brendanjerwin opened this issue Apr 13, 2016 · 5 comments
Assignees

Comments

@brendanjerwin
Copy link
Collaborator

It seems to use sourcekitten CLI but not the daemon.

@brendanjerwin
Copy link
Collaborator Author

Do you have specific plans around this?

@landaire
Copy link
Owner

The README is incorrect. It was set to use sourcekittendaemon at first, then I just made it use sourcekitten because the daemon had some requirement that I didn't like. Maybe it was that it required an Xcode project? This project was kinda vaporware that I wasn't really going to maintain but I'll work on it (maybe this weekend, maybe today) since it seems as though some others found this repo as well and I'd like to get it to a useable state if I can.

@landaire landaire self-assigned this Apr 13, 2016
@brendanjerwin
Copy link
Collaborator Author

Oh yeah! I'm really excited at the possibility of using vim instead of Xcode.

I think sourcekittendaemon might be a good option to have, it should allow for more complete completions. :)

@smallfx
Copy link
Collaborator

smallfx commented May 5, 2016

hey @landaire and @brendanjerwin! i forked this repo and did some stuff with it.
https://github.com/smallfx/deoplete-swift

my fork uses sourcekittendaemon for completions.
the completion 'triggering' is pretty janky still, which is something i wanna fix.
also i want to make it auto-run sourcekittendaemon when nvim starts up in (or cd's to) a directory with an xcode project.
(currently depends on the user having started up the server for the correct proj independently)

i dunno if this falls in line with what @landaire wants to do with the project so i'm not sure if it makes sense to merge it back in or whatever.
i'm fine with either way :)

@landaire
Copy link
Owner

landaire commented May 5, 2016

@smallfx definitely. I think that having both sourcekitten and sourcekittendaemon might be something worth having so that one-off Swift files without an Xcode project (such as on other systems like Linux/FreeBSD) can still get completion.

I created this project originally just as a stab at making easy autocomplete for Swift when I was playing with the language and didn't really touch it after (obviously). I was honestly kind of surprised when I saw issues being made.

Make a PR for the changes and I'll provide some feedback and see if we can iron out the triggering issue. As far as the auto-running the daemon, I don't think it'd be too hard to do. I did some similar logic here in deoplete-d for adding the project's root as an import path.

A plan for that could be to:

  • Take the path of the file
  • Traverse up the tree
  • For each dir, check if an *.xcodeproj file exists
  • If a match is found, start sourcekittendaemon
  • If a match is not found after fully traversing the tree, default to using sourcekitten

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

No branches or pull requests

3 participants