blob: 48d53d6b382830a09d37041fd8db6cfd0c0d5dea (
plain)
1
2
3
4
5
6
7
|
(defun init-flycheck-rust-cargo-has-command-p (command)
(let* ((commands (process-lines "cargo" "--list"))
(trimmed (-map (lambda (row) (-slice row 4 (string-search " " 4))) commands)))
(seq-contains-p (-rest trimmed) command)))
(advice-add 'flycheck-rust-cargo-has-command-p
:override 'init-flycheck-rust-cargo-has-command-p)
|