0

Project structure

I have a Makefile in the root of my project for all the flags I use frequently. Here is the project structure:

├── Cargo.lock
├── Cargo.toml
├── katex-header.html
├── Makefile
├── README.md
├── src
│   ├── lib.rs
│   ├── main.rs
│   ├── pfaffian.rs

Cargo's output is wrongly interpreted

When there is a warning in pfaffian.rs, make outputs

cargo build -r --jobs=-1
warning: unused variable: `off`
   --> src/pfaffian.rs:187:9
    |
187 |     let off = indx_up.len();
    |         ^^^ help: if this is intentional, prefix it with an underscore: `_off`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: `impurity` (lib) generated 1 warning (run `cargo fix --lib -p impurity` to apply 1 suggestion)
    Finished release [optimized] target(s) in 0.25s

Neovim's quickfix then assumes --> src/main.rs is the name of the file and creates a blank buffer. The behavior is the same for a compilation error. Neovim blank buffer at --> src/pfaffian.rs How can I change this behavior so that this arrow is parsed out of the file path? Either

  • Makefile change to update the quickfix list
  • Global neovim config are solutions that would help me.
Dumbo
  • 55
  • 8

0 Answers0