[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape 3cd8d42047 2/2: Expose request timeout `dape-timeo
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dape 3cd8d42047 2/2: Expose request timeout `dape-timeout' as per request #67 |
Date: |
Mon, 12 Feb 2024 12:58:07 -0500 (EST) |
branch: externals/dape
commit 3cd8d4204753f411fad8ca1801de04566d2f6643
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Expose request timeout `dape-timeout' as per request #67
---
dape.el | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/dape.el b/dape.el
index bcdd73adbc..92dbdb8c0a 100644
--- a/dape.el
+++ b/dape.el
@@ -557,6 +557,10 @@ The hook is run with one argument, the compilation buffer."
"Print debug info in *dape-repl* and *dape-connection events*."
:type 'boolean)
+(defcustom dape-request-timeout jsonrpc-default-request-timeout
+ "Number of seconds until a request is deemed to be timed out."
+ :type 'natnum)
+
;;; Face
(defface dape-breakpoint-face
@@ -1160,8 +1164,14 @@ and success. See `dape--callback' for signature."
(when (functionp cb)
(lambda ()
(dape--repl-message
- (format "* Command %s timeout *" command)
'dape-repl-error-face)
- (funcall cb conn nil "timeout")))))
+ (format
+ "* Command %s timed out after %d seconds, the \
+timeout period is configurable with `dape-request-timeout' *"
+ command
+ dape-request-timeout)
+ 'dape-repl-error-face)
+ (funcall cb conn nil "timeout")))
+ :timeout dape-request-timeout))
(defun dape--initialize (conn)
"Initialize and launch/attach adapter CONN."