Skip to navigation
Install emacs racer
23.02.21
Installation You will need to use a nightly version of rust. If you're using rustup, run $ rustup toolchain add nightly Install Racer and download the source code of Rust: $ rustup component add rust-src $ cargo +nightly install racer Allow Emacs to install packages from MELPA: (require 'package) (add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/")) Install the Emacs package for Racer: M-x package-install RET racer RET Configure Emacs to activate racer when rust-mode starts: (add-hook 'rust-mode-hook #'racer-mode) (add-hook 'racer-mode-hook #'eldoc-mode) For completions, install company with M-x package-install RET company RET. A sample configuration: (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) For automatic completions, customize company-idle-delay and company-minimum-prefix-length. Racer process may be slow to respond for instance when indexing. You can customize racer-command-timeout and racer-eldoc-timeout to avoid rendering your Emacs session unresponsive. Eldoc timeout should be on the lower side and defaults to 0.5 seconds. You can probably tweak it down on a fast machine. Timeout of nil will wait indefinitely.
https://github.com/racer-rust/emacs-racer
Reply
Anonymous
Information Epoch 1745873169
Worse is better.
Home
Notebook
Contact us