-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Because cargo clippy is not included in my distribution’s outdated packages, I decided to install the rust suite via rustup.
Everything about using rust work fine, including clippy, but now flycheck can’t initialize anymore the rust checkers, throwing the message Error in flycheck-rust-setup: (json-end-of-file)
after opening a rust project source file.
- Here is the output of the flycheck-verify-setup :
Syntax checkers for buffer main.rs in rust-mode:
No checker to run in this buffer.
Checkers that are compatible with this mode, but will not run until properly configured:
rust-cargo (manually disabled) enable
- may enable: yes
- may run: t
- executable: Found at /opt/cargo/bin/cargo
- Cargo.toml: Found
- Crate type: lib
- Binary name: Not required
rust (manually disabled) enable
- may enable: yes
- may run: t
- executable: Found at /opt/cargo/bin/rustc
rust-clippy (automatically disabled) reset
- may enable: no
- may run: t
- executable: Found at /opt/cargo/bin/cargo
- Clippy: Cannot find the `cargo clippy' command
- Cargo.toml: Found
Flycheck Mode is enabled. Use C-u C-c ! x to enable disabled
checkers.
--------------------
Flycheck version: 33snapshot (package: 20230306.414)
Emacs version: 27.1
System: aarch64-unknown-linux-gnu
Window system: x
- $PATH =
/home/user1/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games:/opt/cargo/bin
- $RUSTUP_HOME =
/opt/rustup
- $CARGO_HOME =
/opt/cargo
- My init.el part setting up flycheck :
;; FLYCHECK
(add-hook 'after-init-hook #'global-flycheck-mode)
(with-eval-after-load 'rust-mode
(add-hook 'flycheck-mode-hook #'flycheck-rust-setup)
(setq-default flycheck-disabled-checkers '(rust-cargo rust))
(setq-default flycheck-rust-checker 'rust-clippy))
I have no clue how to fix this… It’s like the distribution packages include some additional tweaks to make it work, not rustup.
drewr
Metadata
Metadata
Assignees
Labels
No labels