-
Notifications
You must be signed in to change notification settings - Fork 24
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
Avoid misconfiguration and try to help racer to find a Cargo.toml #29
Conversation
alkama
commented
Jun 8, 2015
- Rewrite the README file so that it warns for misconfiguration and is more structured.
- Do not launch completion if the configuration is obviously wrong.
- Check that "racer.racerBinPath" points to a valid file.
- Check that "racer.rustSrcPath" points to a valid directory.
- Rescan the current project path for each completion because it can change during the editor's life.
- Write the temporary file directly in the project path to help racer locate a related Cargo.toml.
- Clean temp files immediately after racer returns.
* Check that "racer.racerBinPath" points to a valid file. * Check that "racer.rustSrcPath" points to a valid directory. * Rescan the current project path for each completion because It can change during the editor's life.
* Write the temporary file directly in the project path to help racer locate a related Cargo.toml. * Clean temp files immediately after racer returns.
If it didn't mess it, it should be valid for a v0.12 and should fix #26 |
I don't understand what you mean by, if it didn't mess it? |
I just meant that it should work fine! (but that's unless I missed a corner case, we're human after all) |
:) |
Avoid misconfiguration and try to help racer to find a Cargo.toml
Sorry, messed up the publishing and skipped a minor version but it's published. |
Cool! Thanks! What remains now is to be more vocal about misconfigurations. Maybe later I'll see if I can port a "go to definition" and/or snippet feature from racer. |
Unfortunately these changes did not fix completion from external crates using Cargo.toml or completion from files within the project. Are these completions working for you now? The only completions I get are from the current file and rust/src. What configurations do you have? I am running Linux 4.0.5, gnome-shell 3.16, Atom .207, rust nightly (as of today), and current racer. |
Hum, I'm on OSX. Can you check if racer is working correctly in isolation? something like: Because that's basically what we are submitting and just using the results. If it doesn't work, it's probably something to issue and debug at racer instead :) Dumb exemplefor:
fn foo() {
;
}
fn main() {
f
} the command would be: Note: the "2" is because i'm using tabs which account for 1 character (the markdown formatter converts that to spaces and dont give justice). |
I get cargo and project file completions when I run racer manually using the format you outlined. Now that I know what works, I will experiment with atom-racer and see if I can get something working. |
Excellent :) |