You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
355 B
EmacsLisp
8 lines
355 B
EmacsLisp
2 years ago
|
(defun init-flycheck-rust-cargo-has-command-p (command)
|
||
2 years ago
|
(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
|
||
2 years ago
|
:override 'init-flycheck-rust-cargo-has-command-p)
|