landaire / deoplete-swift

Swift completions in Vim using deoplete
MIT License
24 stars 9 forks source link

Doesn't actually use sourcekittendaemon #2

Open brendanjerwin opened 8 years ago

brendanjerwin commented 8 years ago

It seems to use sourcekitten CLI but not the daemon.

brendanjerwin commented 8 years ago

Do you have specific plans around this?

landaire commented 8 years ago

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.

brendanjerwin commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

@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: