branch: externals/dape
commit ad4fe1aa4de5d3b012649bf869cb29d4369dec15
Author: Daniel Pettersson <[email protected]>
Commit: Daniel Pettersson <[email protected]>
Add read config hook
As suggested in #212
---
dape.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dape.el b/dape.el
index 017e873198..e97f5e9217 100644
--- a/dape.el
+++ b/dape.el
@@ -738,6 +738,10 @@ compilation is successful."
"Show `dape-configs' hints in minibuffer."
:type 'boolean)
+(defcustom dape-read-config-hook nil
+ "Called before `dape-configs' is evaluated into completion candidates."
+ :type 'hook)
+
(defcustom dape-minibuffer-hint-ignore-properties
'( ensure fn modes command command-args command-env command-insert-stderr
defer-launch-attach :type :request)
@@ -5565,6 +5569,7 @@ nil."
Completes from suggested conjurations, a configuration is suggested if
it's for current `major-mode' and it's available.
See `modes' and `ensure' in `dape-configs'."
+ (run-hooks 'dape-read-config-hook)
(let* ((suggested-configs
(cl-loop for (name . config) in dape-configs
when (and (dape--config-mode-p config)