Fork me on GitHub

Does anyone rely on omnifunc based completion and refuses to use an async completion plugin?


Because I don't think I can get omnicompletion working with this single thread of Neovim, I need to be able to block and wait for a result from the nREPL but it just doesn't seem possible.


Async completion tools will work great, omnicomplete requires sync code and I'm struggling to force async code to be sync within a single thread.


Oh crap, I think I fixed it hah


Hold up, just a little more hacking...


Hahaha made it work


:sleep ftw 😅

Nir Rubinstein14:04:27

Great! (because I only use omnicomplete 😉)


Abbreviating namespace names in completion? Yay or nay? So you see the namespace each value resides in which is useful, but takes up a fair bit of space. You also see the full namespace path for namespaces you're completing.


The question is, how many segments should be shortened (all but last?) and should it be on all namespace strings or just the contextual parts? Like, if you're autocompleting an actual namespace, maybe it's full, but if it's just "oh this function is from this ns" it gets shortened :thinking_face:


what about if the namespace is currently required with an alias, we use that alias?


i rarely see fully qualified namespace names


like if i'm using clojure.string/join and i have clojure.string required :as str, i'm going to start typing str/j


Yeah, I know what you mean, pretty tricky to implement but will consider that sort of thing for the future. Same goes for auto requiring if you type a known prefix from other namespaces.


So you might have my-fn F [x y] my.ns.that.begins.with.the.same N Should I shorten the one after the function completion? Should I also do the namespace in the list as a completion?


By shorten, I mean to m.n.t.b.w.t.same or m.n.s.w.functions?


Or leave everything exactly how it is, even it's it's L O N G sometimes?


I think I'll leave them as is until it's a real problem since it brings up loads of questions around configuration and stuff.


Completion clients can actually just remap these strings as they see fit anyway.


Actually working though! I'm placing the arg lists next to the function names for now to make sure you can still see them even when a long name at the bottom is making things a bit too wide.


(and it should work with cljs)


Ayyyy working well! I've added context support for local lets and extended the omnifunc support to ANY Conjure client. So you just need to implement an async completions function then you get omnifunc for free. Next I'll implement async complete with deoplete and coc through the existing plugins that can hook into the async completions function provided by the clojure language client. If Racket gets added with completion support, all of the completion plugins will just work 😄

bananadance 8

nREPL is getting a simple completion op built in (without CIDER) soon too, so this should work with that. And I haven't tried it but this should work with shadow-cljs too. Please let me know if you hit any issues! This is all on the develop branch.


oh man, this is getting so close


that async complete is the last thing before I try this as my daily