-
Notifications
You must be signed in to change notification settings - Fork 9
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
anaconda_racer: completion error #20
Comments
Your report is pretty complete already, this problem is probably due some environmental issue, I am working (sadly slowly) in a new redesigned version of the plugin that calls racer directly using a C FFI between Python and Rust using this custom crate to fix issues like this one and others that I already detected. The delay that you noticed in the completion is due the fact that anaconda is an asynchronous client-server architecture based plugin (so it doesn't make ST3 to lock while processing heavy requests) so when a requests produce a result we inject it into the "naive" ST3 native completions. |
Interesting. I'm using cffi to do the exact same thing, allowing Python to call into Rust, for one of my projects, tyro. Let me know if I can be of any help :) |
What a coincidence :) I will push what I have into a new branch and let you know so you can take a look, I think everything is done it was easy stuff but I am still working in the part that compile the binary parts automatically when first installation and/or updates. |
Hi, you can take a look at the new branch, you can even clone it and test it in your ST3 (probably broken on the automatic compilation but you can just compile it manually). |
I'll have a look as soon as I get a chance. |
I'm afraid I'm just not acclimated enough with Sublime plugins to give you any useful feedback about this project at the moment. Is there any way you could get me oriented a bit and give me some idea, for example, the roles of the various project directories? As someone almost completely unfamiliar with Sublime plugin development I'll be more of a hindrance than a help for the time being but if you have the patience I wouldn't mind being pointed in the right direction. |
You can have a look at the developer handbook if you like but basically, anaconda is split between two different components, the GUI related code that is executed by the ST3 embedded Python interpreter and the JsonServer that is actually the one that do all the linting, completion, definition finding work in an asynchronous fashion and send results back to the GUI related code using a custom JSON protocol when there are results available. Note: The server code is really implemented in anaconda, anaconda-rust is a plugin for anaconda so it doesn't implements any server related code it just implements a common interface (to all the anaconda's plugins) to expose the rust tools to lint, complete etc About the directories hierarchy:
The Inside the handlers directory there is a python handler for any given command, the commands directory implements those commands (but they could be implemented directly in the handlers files for example), the linting directory just implements the linting features and the rust_anaconda is the cFFI/Ctypes wrapper around the C shared library. That is more or less everything |
Really helpful. Thank you. You should add this info to the README or to a |
Racer works fine from the command line. Auto-completion searches in Sublime have some strange behavior. For example, typing
use std::io::B
, then pausing/waiting...I'm using the latest versions of anaconda and anaconda_rust, with all configuration/paths correct:
It seems like this is an issue with
syntex_syntax
or possiblyracer
but as I mentioned, racer works perfectly from the command line.Please let me know what other information might be useful.
The text was updated successfully, but these errors were encountered: