[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dape b27a7db84c 071/123: Add defcustom buffer actions t
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dape b27a7db84c 071/123: Add defcustom buffer actions to Dape buffers |
Date: |
Tue, 5 Dec 2023 03:58:02 -0500 (EST) |
branch: externals/dape
commit b27a7db84cea8295fb43b34f44e16282d1ec5fa1
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>
Add defcustom buffer actions to Dape buffers
---
dape.el | 85 ++++++++++++++++++++++++++++++++++++++++-------------------------
1 file changed, 53 insertions(+), 32 deletions(-)
diff --git a/dape.el b/dape.el
index b4c1277b04..9c750a344e 100644
--- a/dape.el
+++ b/dape.el
@@ -104,19 +104,25 @@ Functions and symbols in configuration:
"Prefix of all dape commands."
:type 'key)
+(defcustom dape-display-source-buffer-action
+ '(display-buffer-reuse-window
+ display-buffer-same-window)
+ "`display-buffer' action used when displaying source buffer."
+ :type 'sexp)
+
(defcustom dape-on-start-hooks '(dape-info dape-repl)
"Hook to run on session start.
The hook is run with one argument, the compilation buffer."
:type 'hook)
-(defcustom dape-inline-variables nil
- "Show variable values inline."
- :type 'boolean)
-
(defcustom dape-main-functions nil
"Functions to set breakpoints at startup if no other breakpoints are set."
:type '(repeat string))
+(defcustom dape-read-memory-default-count 1024
+ "The default count for `dape-read-memory'."
+ :type 'natnum)
+
(defcustom dape-info-buttons
'(("next" . dape-next)
("step" . dape-step-in)
@@ -129,9 +135,21 @@ The hook is run with one argument, the compilation buffer."
:type '(alist :key-type string
:value-type function))
-(defcustom dape-read-memory-default-count 1024
- "The default count for `dape-read-memory'."
- :type 'natnum)
+(defcustom dape-info-buffer-variable-format 'line
+ "How variables are formatted in *dape-info* buffer."
+ :type '(choice (const :tag "Truncate string at new line" line)
+ (const :tag "No formatting" nil)))
+
+
+(defcustom dape-info-display-buffer-action
+ '((display-buffer-in-side-window)
+ . ((side . left)))
+ "`display-buffer' action used when displaying *dape-info* buffer."
+ :type 'sexp)
+
+(defcustom dape-repl-use-shorthand nil
+ "Dape `dape-repl-commands' can be invokend with first char of command."
+ :type 'boolean)
(defcustom dape-repl-commands
'(("debug" . dape)
@@ -148,6 +166,29 @@ The hook is run with one argument, the compilation buffer."
:type '(alist :key-type string
:value-type function))
+(defcustom dape-repl-display-buffer-action
+ '((display-buffer-reuse-window
+ display-buffer-in-side-window)
+ . ((side . bottom)
+ (slot . -1)))
+ "`display-buffer' action used when displaying *dape-repl* buffer."
+ :type 'sexp)
+
+(defcustom dape-run-in-terminal-display-buffer-action
+ '((display-buffer-in-side-window) .
+ '((side . bottom)
+ (slot . 1)))
+ "`display-buffer' action used when displaying run in terminal buffer."
+ :type 'sexp)
+
+(defcustom dape-inline-variables nil
+ "Show variable values inline."
+ :type 'boolean)
+
+(defcustom dape-inline-variable-length 30
+ "Maximum length of inline variable overlays."
+ :type 'natnum)
+
(defcustom dape-compile-fn #'compile
"Function to run compile with."
:type 'function)
@@ -161,25 +202,13 @@ The hook is run with one argument, the compilation
buffer."
The hook is run with one argument, the compilation buffer."
:type 'hook)
-(defcustom dape-repl-use-shorthand nil
- "Dape `dape-repl-commands' can be invokend with first char of command."
- :type 'boolean)
-
-(defcustom dape-inline-variable-length 30
- "Maximum length of inline variable overlays."
- :type 'natnum)
-
-(defcustom dape-info-buffer-variable-format 'line
- "How variables are formatted in *dape-info* buffer."
- :type '(choice (const :tag "Truncate string at new line" line)
- (const :tag "No formatting" nil)))
-
(defcustom dape--debug-on '(io info error std-server)
"Types of logs should be printed to *dape-debug*."
:type '(set (const :tag "dap IO" io)
(const :tag "info logging" info)
(const :tag "error logging" error)
(const :tag "dap tcp server stdout" std-server)))
+
;;; Face
@@ -372,9 +401,7 @@ If PULSE pulse on after opening file."
(when-let ((marker (dape--object-to-marker plist)))
(let ((window
(display-buffer (marker-buffer marker)
- ;; TODO Should probably be an custom
- '(display-buffer-reuse-window
- display-buffer-pop-up-window))))
+ dape-display-source-buffer-action)))
(unless no-select
(select-window window))
(with-current-buffer (marker-buffer marker)
@@ -1000,9 +1027,7 @@ Starts a new process to run process to be debugged."
" ")
buffer
buffer)
- (display-buffer buffer '((display-buffer-in-side-window) .
- '((side . bottom)
- (slot . 1))))))
+ (display-buffer buffer dape-run-in-terminal-display-buffer-action)))
(cl-defmethod dape-handle-request (_process (_command (eql startDebugging))
arguments)
"Handle startDebugging requests.
@@ -2279,8 +2304,7 @@ interactively or if SELECT-BUFFER is non nil."
:expander 'dape--expand-exceptions-widget))
(widget-setup))
(setq window (display-buffer buffer
- '((display-buffer-in-side-window)
- . ((side . left)))))
+ dape-info-display-buffer-action))
(when select-buffer
(select-window window)
(goto-char (point-min)))))
@@ -2504,10 +2528,7 @@ Empty input will rerun last command.\n\n\n"
(unless dape-repl-mode
(dape-repl-mode))
(setq window (display-buffer (current-buffer)
- '((display-buffer-reuse-window
- display-buffer-in-side-window)
- . ((side . bottom)
- (slot . -1)))))
+ dape-repl-display-buffer-action))
(when (called-interactively-p 'interactive)
(select-window window)))))
- [elpa] externals/dape bc17ae80ff 078/123: Fix debuggee cleanup, (continued)
- [elpa] externals/dape bc17ae80ff 078/123: Fix debuggee cleanup, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 30b2695154 087/123: Cancel timeout timers on process kill, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 41cfcc3ce3 089/123: Variety of dape--tree-widget performance "hacks", ELPA Syncer, 2023/12/05
- [elpa] externals/dape b7c578992d 094/123: Fix unnecessary newline in stopped repl text, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 4c990a5769 110/123: Rename `dape-breakpoint-*' functions for discoverability, ELPA Syncer, 2023/12/05
- [elpa] externals/dape f02fc87e82 116/123: Fix fringe check when placing breakpoints, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 8cc8b262c1 059/123: Add custom formatting to dape-info variables, ELPA Syncer, 2023/12/05
- [elpa] externals/dape ebd9ebf6a8 074/123: Default to "sensible" values in `dape-config' when missing, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 5c62153574 042/123: Fix various customization types, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 3770a22b28 060/123: Cleanup before emacs exits #8, ELPA Syncer, 2023/12/05
- [elpa] externals/dape b27a7db84c 071/123: Add defcustom buffer actions to Dape buffers,
ELPA Syncer <=
- [elpa] externals/dape f982879c17 080/123: Cleanup timeouts before restart, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 5f65524007 102/123: Fix REPL completions when process has never stopped #15, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 2831601925 014/123: Small README improvements, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 3a05121b02 019/123: Fix adapter examples, ELPA Syncer, 2023/12/05
- [elpa] externals/dape df0c2d8357 023/123: Require success to launch/attach after initialize, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 161501b4a5 029/123: Fix example in readme, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 819d4c39f9 028/123: Keep log and expression breakpoints when removing breakpoints, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 907828d05e 032/123: Fix toggle breakpoint, ELPA Syncer, 2023/12/05
- [elpa] externals/dape bddc5102b5 039/123: Clarify package description, ELPA Syncer, 2023/12/05
- [elpa] externals/dape 49909a1a39 043/123: Use presentation hits for auto expand locals scope, ELPA Syncer, 2023/12/05