racer-rust / emacs-racer

Racer support for Emacs
399 stars 48 forks source link

File mode specification error #132

Closed rakanalh closed 4 years ago

rakanalh commented 4 years ago

Hello,

I setup my emacs to use the racer package. However, when opening a rust file i get the following error:

File mode specification error: (error Autoloading file /home/rakan/.emacs.d/elpa/racer-20191001.2344/racer.elc failed to define function racer)

I am using:

GNU Emacs 26.3 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.10)
 of 2019-08-29
mookid commented 4 years ago

What is your config? What if you delete the elc file?

rakanalh commented 4 years ago

@mookid i deleted the elc file and i get this error:

Before deletion:

File mode specification error: (error Autoloading file /home/rakan/.emacs.d/elpa/racer-20191001.2344/racer.elc failed to define function racer)

After:

File mode specification error: (error Autoloading file /home/rakan/.emacs.d/elpa/racer-20191001.2344/racer.el failed to define function racer)

My configs look as follows:

(use-package rust-mode)

(use-package flycheck-rust
  :hook
  (flycheck-mode . flycheck-rust-setup))

(use-package racer
  :after rust-mode
  :hook
  (rust-mode . racer-mode)
  (racer-mode .eldoc-mode)
  (racer-mode . company-mode)
  :custom
  (company-tooltip-align-annotations t))

(use-package company-racer
  :after racer-mode
  :config
  (add-to-list 'company-backends 'company-racer))

(provide 'lang-rust)
mookid commented 4 years ago

(racer-mode .eldoc-mode)

changing to (racer-mode . eldoc-mode)

should fix that.

rakanalh commented 4 years ago

ahh :man_facepalming:

Thanks @mookid