racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

company: back company-capf error "symbol's function definition is void -let" with args (candidate B) #111

Closed stuartstein777 closed 3 years ago

stuartstein777 commented 5 years ago

Running on Emacs on Windows,

When I try to autocomplete on

use std::io::B then TAB

I get the error

Company: backend company-capf error "Symbol's function definition is void: -let" with args (candidates B)

my init.el

(add-hook 'rust-mode-hook 'cargo-minor-mode)

(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)

(add-hook 'racer-mode-hook #'company-mode)
(require 'rust-mode)
(define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common)
(setq company-tooltip-align-annotations t)

I have an environment variable set

RUST_SRC_PATH = C:\Users\stuarts\.multirust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src

I can run / build with cargo fine, all I'm missing is racer and autocomplete stuff.

I have the source the location in the RUST_SRC_PATH, it was installed via

$ rustup component add rust-src
$ cargo +nightly install racer

Any ideas why I'm getting this error?

Wilfred commented 5 years ago

Sounds like you don't have the dependencies of racer.el, specifically dash.el which provides -let. How did you install racer.el?

stuartstein777 commented 5 years ago

I installed it following the guide here:

https://github.com/racer-rust/emacs-racer

Wilfred commented 5 years ago

Did you install racer.el from MELPA? Do you have dash.el? If you install dash.el, this package should work.

Wilfred commented 3 years ago

Closing due to age. Feel free to reopen if you can reproduce.