1
0
Fork 0

feat(emacs): add download-file interactive function

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-01-17 13:05:25 -05:00
parent 97f1e5dbec
commit 9949a4e45f
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -44,6 +44,15 @@
(url-copy-file (cdr f) (car f) t))
file-path-urls)))))
(defun download-file (&optional url filepath)
"Download the file from URL to FILEPATH."
(interactive)
(let* ((url (or url
(read-string "url: ")))
(filepath (or filepath (read-file-name "filename: "))))
(url-copy-file url filepath 1)))
;; LSP
(setq lsp-inlay-hint-enable t)