-
-
Notifications
You must be signed in to change notification settings - Fork 107
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 improvements #16
Comments
Hi,
PD: You just released 0.8, I was testing coc with 0.7, but I think it should continue working |
Oh wow! This is brilliant, I didn't think anyone would be able to get it working nicely with the omnifunc though, I wonder how that performs with many dependencies loaded. When I hooked deoplete into it I saw a lot of input lag. So my typing was really hindered by going off to a blocking function on every key press. Is this actually asynchronous somehow? I'm just not sure how it could be, maybe it's blocking but "fast enough". My theory was that I'd need to expose some sort of async port in the Conjure JVM that tools such as deoplete and CoC could hook into and call without blocking the Neovim thread. Maybe that's over-engineering seeing this. I'll give it a try, thank you very much!
Could just be your TERM environment variable or something, I vaguely recall having trouble with that in the past. |
It works really well 😍 I have no idea how it's so fast though, I thought it should be blocking the input 🤔 |
Ah, if you're not connected to anything it'll spam "you have no matching connections" to the log as it tries to complete. I'll silence that I think. |
It's not asynchronous. The call to |
I wonder if an async + callback based system could be implemented, like you give it a Neovim funcref or something and it'll call that with the results when done 🤔 I'm going to change the current setup anyway so your autocomplete won't log out "no matching connections" but the manual omnicomplete will. But yeah, I think |
Plan: Open up a port that lets you communicate with Conjure over msgpack RPC just like neovim does. So this is a side port that lets you give Conjure commands without having to go through neovim and block the process. You call a function to get the port. Once you have that your async completion process can just ask Conjure (which is fully multi threaded any way) for completions. It will only block if there is currently an eval blocking the prepl on the other end, a timeout there is probably a good idea. Another idea: I wonder if I could add compliment to Conjure's JVM then bridge the requests it makes for symbols and information over the network. Essentially making compliment work over the network 🤔 Or I'll fork it and pull out the bits I need to get it working over the network. |
So it opens up on a random port and allows you to send and receive msgpack RPC messages like Neovim does over stdio. Should support any number of clients, will have to make it so that you can request the port. I don't think it'll work right now so I'll write a test client to check things with next. #16
@jlesquembre I've added a JSON RPC server to Conjure and I'm using it to add support for Deoplete here https://github.com/Olical/conjure/blob/master/rplugin/python3/deoplete/sources/conjure.py You might want to make use of it too, it works really well for me! I won't release this as a tagged version just yet because I want to give it a go at work all week first. I ended up changing a lot so I need to make sure it still works fine without any completion tools installed etc. |
Nice! I'll try to find some time tomorrow and update my CoC plugin |
Done, updated it to use the RPC server |
And it worked!? 😱
…On Mon, 15 Apr 2019, 23:32 José Luis Lafuente, ***@***.***> wrote:
Done, updated it to use the RPC server
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#16 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AATPXb1cBXmxICITFc3q0w-hckoq8XIqks5vhP4GgaJpZM4cX5wi>
.
|
I'm realizing that my last message was too short. One last thing, you wrote that sometimes completions were not trigger for you, I think that the reason is CoC timeout for completions, 2 seconds by default: and had nothing to do with the |
Hah, it's okay, I didn't mind at all, I'm just surprised it worked I guess
😁 and you won't need to worry about request IDs unless you're making
multiple requests in parallel since the results could come back in any
order.
I'm pretty sure the CoC and Deoplete sources only run once at a time though
so it's fine. This API may seem weird but it's the same one Neovim uses to
talk to Conjure itself, just encoded in JSON instead of msgpack so you
don't need to add a dependency.
I'll get a release out soon, just want to make sure I'm happy with where
completion is at first. Maybe I'll get context working (completion of local
let bindings etc).
…On Tue, 16 Apr 2019, 06:31 José Luis Lafuente, ***@***.***> wrote:
I'm realizing that my last message was too short.
I did some quick tests, and It worked perfectly, great job!
Right now I'm not making use of the RPC request id, just using always the
same id. Need to think about how to handle it, or even if it's possible to
manage them with CoC.
I didn't do a release of the plugin yet, waiting for the next conjure
release.
One last thing, you wrote that sometimes completions were not trigger for
you, I think that the reason is CoC timeout for completions, 2 seconds by
default:
https://github.com/neoclide/coc.nvim/blob/303d95d2bbb1d0bed06f79ca399461ef5d115426/data/schema.json#L319-L325
and had nothing to do with the triggerCharacters option.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#16 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AATPXUBDRe0zIGI7TdrPFzgWUxn3WIkkks5vhWAjgaJpZM4cX5wi>
.
|
Released under v0.10.0 https://github.com/Olical/conjure/releases/tag/v0.10.0 @jlesquembre Feel free to tag your release too 😄 |
@Olical nice, just created a new release |
Surprisingly easy after all those upgrades to read-form!
I've added a flag in the latest commit (not under a tag yet) that sets I now check for that flag before sending off for completions from my Deoplete plugin. Might come in handy for others in the future too. If you make a call before it's up then it'll block until it's ready, this just allows you to avoid making background calls that would lock up Neovim until everything's running. |
v0.13.0 will contain automatic injection of Compliment. You don't need to depend on it any more, it'll get loaded for you. When Compliment supports ClojureScript all you'll have to do is update Conjure and it'll just start working for you, neat 😄 🎉 |
Omnicompletion is released but here's some things that should be improved at some point:
The text was updated successfully, but these errors were encountered: