-
Notifications
You must be signed in to change notification settings - Fork 48
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 doesn't work #27
Comments
Same for me, Os X 10.10.5, emacs 24.5.1, with .emacs:
|
Same for me, doesn't work from Emacs, but works from CLI. |
Eventually I managed to make it work by fiddling with the config:
My hypothesis is that it wasn't getting the rust src directory with the old conf. |
Didn't work for me. Company: An error occurred in auto-begin
Company: backend company-capf error "Wrong type argument: stringp, nil" with args (candidates std)
eldoc error: (wrong-type-argument stringp nil) |
Doesn't work on Windows either (same error, racer from CLI works though). Config: (use-package racer
:config (progn
(setq racer-cmd (expand-file-name "~/.cargo/bin/racer")
racer-rust-src-path (expand-file-name "~/git/rust/src/")
company-tooltip-align-annotations t)
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode)
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common))) |
I don't get an error but just the message "no completion found". I am using the copy of @doppioslash 's latest post. I can see the racer-rust-src-path variable is set correctly. Any ideas? |
Finally, I've just installed Rust plugin for Intellij (https://github.com/intellij-rust/intellij-rust) and it works fine (not perfect, but at least it works). |
i'm also getting this issue, I think I upgraded from emacs 24 to 25, now see it.. no extra messages in debug window. |
Works fine here on Emacs 25.1 and FWIW, this is my config: (setq racer-cmd "~/.cargo/bin/racer")
(setq racer-rust-src-path "~/Downloads/rustc-1.10.0/src")
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode) |
I've just checked out emacs head.. as I thought it might have been that. Emacs : 25.1.90 |
removed ~/.emacs.d/ restarted emacs, followed instructions as per readme.md and still no completion.. |
Gday Ane, After spending a few nights trying to diagnose what is gone wrong, my patience has worn thin and I have decided to pursue other matters. I have too much muscle memory to abandon emacs and it looks like I can't get emacs to work as an IDE how I would expect. Thanks for your time in helping me. |
Well, it is sort of working for me now. .zshrc: # Rust
export PATH=${PATH}:~/.cargo/bin
export PATH=${PATH}:/usr/local/Cellar/rust/1.10.0/bin
export RUST_SRC_PATH=~/.cargo/rust-1.10.0/src Config: (use-package racer
:config (progn
(setq company-tooltip-align-annotations t ;
racer-cmd (expand-file-name "~/.cargo/bin/racer")
racer-rust-src-path (expand-file-name (getenv "RUST_SRC_PATH")))
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode))) Now I don't get error messages, but I also can't say that it is very useful:
So, basically, nothing apart from Still using Intellij IDEA Plugin. |
Hm. I'm trying to figure out what everyone has in common here, could it be OSX? I'll need to find a OSX machine to test this on in that case (I'm on Fedora 24 myself). |
@ane UPD: Yeah, looks like
See: Which is weird and sad, honestly. |
I'm not sure what changed, however now its autocompleting use std::io:B as one would expect.. I can't talk for macros.. but at least this part works now.
(require 'flymake-rust) ;; If you want to use rustc compiler, you must add following string: (setq racer-rust-src-path " (add-hook 'rust-mode-hook #'racer-mode) (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common) |
I'm closing this, as most users have reported successful completion. macros: this is a known limitation of racer, and racer.el can't do anything about it I'm afraid. I've added a note in the readme about this. The readme now states what we complete. I think @kovrik was expecting keyword completion too -- this would belong in the If you're not getting completion for |
I've opened a PR on company-keywords to add rust support. I think #27 (comment) is a duplicate of #33. |
oh, i have same problem |
Minor modification based on doppioslash's reply
(shell-command-to-string "echo |
After adding these code as mentioned here #27 (comment). racer completion works great for me. (setq racer-cmd "~/.cargo/bin/racer")
(setq racer-rust-src-path (expand-file-name (getenv "RUST_SRC_PATH")))
@kovrik but it's works well on my machine. |
@azzamsa |
@kngwyu :). That's great, just jump to rust this week. |
Hi
i try to configure Emacs for rust :
I press TAB after use std::io::B, i've got into minubuffer: No completion found
Variable racer-rust-src-path is correctly set.
i try the shell command, it works :
Any idea why it doesn't work ?
The text was updated successfully, but these errors were encountered: