mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-11 13:07:28 -05:00
Handle empty input in +debugger-completing-read
This commit is contained in:
@@ -50,21 +50,24 @@ infromation."
|
|||||||
(+debugger-list-for-dap)
|
(+debugger-list-for-dap)
|
||||||
(+debugger-list-for-realgud)))
|
(+debugger-list-for-realgud)))
|
||||||
(result (--map (cons (cadr it) it) configurations))
|
(result (--map (cons (cadr it) it) configurations))
|
||||||
(completion (completing-read "Start debugger: " (-map 'car result) nil t ))
|
(completion (completing-read "Start debugger: " (-map 'car result) nil t)))
|
||||||
(configuration (cdr (assoc completion result))))
|
(if (eq completion "")
|
||||||
(if (eq (car configuration) 'dap)
|
(user-error "No debugging configuration specified.")
|
||||||
(let* ((debug-args (-> (cdr configuration)
|
(let ((configuration (cdr (assoc completion result))))
|
||||||
cl-rest
|
(if (eq (car configuration) 'dap)
|
||||||
copy-tree
|
;; get dap debugging arguments
|
||||||
dap-variables-expand-in-launch-configuration))
|
(let* ((debug-args (-> (cdr configuration)
|
||||||
(launch-args (or (-some-> (plist-get debug-args :type)
|
cl-rest
|
||||||
(gethash dap--debug-providers)
|
copy-tree
|
||||||
(funcall debug-args))
|
dap-variables-expand-in-launch-configuration))
|
||||||
(user-error "Have you loaded the `%s' specific dap package?"
|
(launch-args (or (-some-> (plist-get debug-args :type)
|
||||||
(or (plist-get debug-args :type)
|
(gethash dap--debug-providers)
|
||||||
(user-error "%s does not specify :type" debug-args))))))
|
(funcall debug-args))
|
||||||
(cons 'dap launch-args))
|
(user-error "Have you loaded the `%s' specific dap package?"
|
||||||
(cons 'realgud (intern (cadr configuration))))))
|
(or (plist-get debug-args :type)
|
||||||
|
(user-error "%s does not specify :type" debug-args))))))
|
||||||
|
(cons 'dap launch-args))
|
||||||
|
(cons 'realgud (intern (cadr configuration))))))))
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Interactive commands
|
;;; Interactive commands
|
||||||
|
Reference in New Issue
Block a user