6 votes
Accepted

Display documentation in Company results

This issue occurs if emacs-racer and company-racer are both installed. They are distinct packages and are not compatible. Install only emacs-racer and the function signatures show up as expected.
Matthew Piziak's user avatar
5 votes
Accepted

Attempting to use org-babel to write “literate” Rust

Hot diggity darn, but minutes later I discovered a crate for that. For future people landing on this question, all I had to do was run cargo install cargo-script and bam you'll be off and org-...
cryptograthor's user avatar
5 votes
Accepted

lsp-mode: disable documentation popup

Try the following. (setq lsp-ui-doc-enable nil lsp-ui-sideline-enable nil) You can check how to set/reset the options from the LSP page.
Swarnendu Biswas's user avatar
3 votes
Accepted

Flycheck and Rust

I had very similar problem. I use OSX and both cargo and rustc weren't in exec-path. Because I see you have /Users path - I assume u run emacs on OSX too. My solution was exec-path-from-shell plugin. ...
Wojciech Polak's user avatar
3 votes
Accepted

Command not found: cargo

Emacs searches the path in the exec-path variable for executable commands. It inherits it from the 'parent environment'. If cargo is available in the terminal, then you will find that when starting ...
dalanicolai's user avatar
  • 7,815
3 votes
Accepted

Cargo-process does not accept user input

After some research, I was able to solve it by adding this to my init.el: (with-eval-after-load 'rust-mode (define-key rust-mode-map (kbd "C-r") 'my-cargo-run)) (defun my-cargo-run () "Build and ...
Safron's user avatar
  • 171
2 votes

Integrate rust-clippy into Emacs Rust development

When you use rust-analyzer via lsp-mode you can tell it to use clippy as the default linter via (setq lsp-rust-analyzer-cargo-watch-command "clippy") (normally it would use check). The ...
robertkrahn's user avatar
2 votes

Integrate rust-clippy into Emacs Rust development

Since rust-clippy normally works at compile time, it should get integrated into whatever you are using for compiling Rust code in Emacs (e.g. cargo-minor-mode). This is touched on in this blog post on ...
Atheriel's user avatar
2 votes

How can I setup the tab indentation size for ***-mode (Rust, Python, Ruby, etc)?

In general, you can do something like this: (add-hook '<foo>-mode-hook (lambda () (setq tab-width 4))) If you have a single global default you prefer: (setq-default tab-width <number you ...
Gastove's user avatar
  • 1,551
2 votes
Accepted

highlight-regexp groups for syntax highlighting

Inside a string, you need to double the backslashes. It makes the regexps look rather ugly, but it's something we have to live with. :-)
Sue D. Nymme's user avatar
  • 1,456
2 votes

my rust analyzer don't work on emacs 27

rust-analyzer can take a while to index and load a project. You should still be fine, even if the text in the minibuffer doesn't immediately change. Try using e.g. the auto completion and see if it ...
robertkrahn's user avatar
2 votes

How to focus or change point on child frame

Bind a key (or keys) to run the lsp-ui-doc-focus-frame command: (use-package lsp-ui :bind (("C-h ." . lsp-ui-doc-focus-frame)))
mankoff's user avatar
  • 4,226
2 votes
Accepted

Adjust unreadable blue color for rustic mode

Looking into rustic-mode revealed rustic-ansi-faces, which can be used to customize the colors in which the cargo compilation output is displayed. I changed it to the following for better legibility: (...
DeinFreund's user avatar
2 votes
Accepted

How to get rid of `> run | debug` clickable text?

VSCode calls them “lenses” for whatever reason, so you can customize them with M-x customize-group lsp-rust-analyzer-lens.
db48x's user avatar
  • 18.1k
1 vote

How to open external rust documentation (rust-analyzer.openDocs) from Emacs?

If you can't get this to work with rust-analyzer you can also consider other documentation backend - especially if you simply want to "open the documentation for the symbol under the cursor" ...
Alex's user avatar
  • 363
1 vote
Accepted

How to specify lsp configuration messages in emacs?

Ok, so you are asking about the configuration options listed in the rust-analyzer documentation. I wasn’t able to find out much about the subject in the lsp-mode documentation, so instead I took a ...
db48x's user avatar
  • 18.1k
1 vote

lsp-rust-analyzer ignores edition value in Cargo.toml

It took me some time to realize that rust-analyzer was not the one to complain, but the buffer with the error message mentioned above was *rustfmt*, and indeed running rustfmt on my source file gave ...
Chen Levy's user avatar
  • 385
1 vote

company doesn't pop up completion list automatically

What is the value of company-begin-commands? It should include at least self-insert-command. Also, try changing company-idle-delay to a low value above zero. The Rust setup I describe in my setting up ...
robertkrahn's user avatar
1 vote

Cargo-process does not accept user input

Another possibility: (defun rust-compile-send-input () "Read string from minibuffer and send it to the rust process of the current buffer." (interactive) (let ((input (read-from-...
bertfred's user avatar
  • 1,729
1 vote

Is there a way to generally search package or language documentation within emacs?

There are solutions for specific languages (such as eldoc-mode), but since every language's documentation is in a different format and style, there is no general solution. For Rust use lsp-mode with ...
db48x's user avatar
  • 18.1k
1 vote
Accepted

rust-analyzer completion broken

Okay, seems like I missed part that yasnippet should be enabled. yas-minor-mode fixed it.
Flowneee's user avatar
  • 247
1 vote

about setting up rust-playground

Even though you've got it in your shell, it looks as though you've not got /usr/local/bin in the PATH environment variable for your Emacs. You could verify this by doing M-x getenv PATH. There might ...
stevoooo's user avatar
  • 737

Only top scored, non community-wiki answers of a minimum length are eligible