Skip to content

Commit

Permalink
update doc string
Browse files Browse the repository at this point in the history
  • Loading branch information
brotzeit committed Aug 17, 2022
1 parent 824f9b0 commit 4fe7ff5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions rustic-cargo.el
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,10 @@ If running with prefix command `C-u', read whole command from minibuffer."
(rustic-run-cargo-command command))))

(defun rustic-cargo-add-missing-dependencies (&optional arg)
"Add missing dependencies to Cargo.toml.
Adds all missing crates by default with latest version.
Use with 'prefix-arg` to select imports to add."
"Lookup and add missing dependencies to Cargo.toml.
Adds all missing crates by default with latest version using lsp functionality.
Supports both lsp-mode and egot.
Use with 'C-u` to open prompt with missing crates."
(interactive)
(when (rustic-cargo-edit-installed-p)
(let (deps)
Expand Down Expand Up @@ -765,10 +766,8 @@ Use with 'prefix-arg` to select imports to add."
(with-current-buffer buf
(let ((errors (split-string (buffer-substring-no-properties (point-min) (point-max)) "\n")))
(dolist (s errors)
(if (string-match-p
(regexp-quote "unresolved import")
s)
(push (string-trim (car (reverse (split-string s))) "`" "`" ) crates)))))
(if (string-match-p (regexp-quote "unresolved import") s)
(push (string-trim (car (reverse (split-string s))) "`" "`" ) crates)))))
crates))

;;;###autoload
Expand Down

0 comments on commit 4fe7ff5

Please sign in to comment.