Questions tagged [rust]
29 questions
6
votes
1 answer
Display documentation in Company results
The GitHub page for emacs-racer shows function signatures in company completion results.
My results display "Function" and nothing beyond.
I've searched through customize-group company and can't find any variables that seem to be relevant. How can…

Matthew Piziak
- 5,958
- 3
- 29
- 77
4
votes
1 answer
lsp-mode: disable documentation popup
I installed rustic-mode with LSP server. They work. But now it shows docs and description of every symbol I put my cursor on. It distracts and irritates me a lot. How can I make it show the symbol info and docs on demand only when I click a certain…

user4035
- 1,039
- 11
- 24
4
votes
2 answers
Cargo-process does not accept user input
Using the Emacs mode for Cargo, I'm able to build and run Rust code inside Emacs. However, the terminal that opens when executing cargo-process-run does not accept user input.
For example, when running
use std::io;
fn main() {
let mut input =…

Safron
- 171
- 7
3
votes
2 answers
Integrate rust-clippy into Emacs Rust development
rust-clippy is a linter for Rust. Is there an existing package or idiom that integrates it into an Emacs Rust workflow, the way emacs-racer integrates racer?

Matthew Piziak
- 5,958
- 3
- 29
- 77
2
votes
1 answer
How to focus or change point on child frame
I am trying to use lsp-ui package to display some documentation for Rust. When I put the cursor on a type for example, a popup child frame is created but the focus is still on the main window. If I use the mouse to click inside the child frame, I…

Mihai
- 143
- 5
2
votes
1 answer
rust-analyzer completion broken
When I try to use auto-completion with lsp + rust-analyzer, all functions inserted like that:
shared_state.clone_from(${1:source})$0
I cannot find any way to disable this "arguments". I don't even understand what package is inserting this (I use…

Flowneee
- 237
- 1
- 9
2
votes
1 answer
company doesn't pop up completion list automatically
I'm trying to get company mode to automatically trigger the pop-up with a list of possible completion. Unless I'm doing this wrong this is not the default behaviour? Current I have to run M-x company-complete manually.
I am not interesting in…

knarf
- 313
- 2
- 8
2
votes
1 answer
highlight-regexp groups for syntax highlighting
I want to highlight certain words to a color using highlight-regexp. The words I want to highlight are "fn", "let", "mut", etc. for rust development.
The code I have so far is this:
(add-hook 'rust-mode-hook '(lambda ()
(highlight-regexp…

Vent
- 77
- 4
2
votes
1 answer
How can I setup the tab indentation size for ***-mode (Rust, Python, Ruby, etc)?
I have rust-mode installed on my Emacs 24.4. The tab indentation I have is 2 whitespaces, however in Rust mode it's different. I want to setup the tab indentation size for rust-mode, how can I do that?
And actually, not only for rust mode, for…

Oskar K.
- 278
- 1
- 7
2
votes
1 answer
Flycheck and Rust
I'm currently struggling to set up error checking for rust in emacs.
Flycheck seems to work fine with other languages (C, Python, Ruby, eLisp) but doesn't appear to do anything in rust-mode.
I haven't noticed any error messages, but when I run…

Jack Cargill
- 23
- 4
2
votes
1 answer
Rust Racer autocomplete problem in Cygwin
I'm trying to set up racer mode for Rust language autocomletion, but when press 'tab' key got messages like this:
Company: An error occurred in auto-begin
Company: backend company-capf error…

DoSofRedRiver
- 133
- 6
1
vote
0 answers
eglot + rust-analyzer: Failed to discover workspace
I've been having a really great experience w/ eglot for C++ development. I'm finding it a lot easier to use than lsp-mode (at least for C++). However, I'm running into an issue w/ both eglot (and lsp-mode, actually). M-x eglot when opening a rust…

Matt Messersmith
- 173
- 1
- 6
1
vote
0 answers
Scrolling through rust-lsp suggestions is very slow. How to go about debugging this?
I'm trying to set up Emacs with rust-lsp ( following this guide). The suggestions from the rust-analyzer are being picked up as you can see in the screenshot.
But when I attempt to scroll through them more than one arrow click at a time(holding…

rtviii
- 113
- 3
1
vote
1 answer
How to specify lsp configuration messages in emacs?
I'm trying to configure rust analyzer to expand proc macros. According to it's documentation I have to configure my editor (i.e. emacs) to send this JSON as a LSP message:
{
"cargo": {
"loadOutDirsFromCheck": true,
},
"procMacro": {
…

zvavybir
- 113
- 4
1
vote
1 answer
Is there a way to generally search package or language documentation within emacs?
In this case, I'm most interested in Rust's documentation, which lives at doc.rust-lang.org/std. eww is incompatible with JS, so the documentation doesn't play nice, thus my general current soln is to just pop over to a browser. I'd be interested to…

cryptograthor
- 225
- 1
- 10