Intellij debug layout
This commit is contained in:
1
emacs/.emacs.d/.gitignore
vendored
1
emacs/.emacs.d/.gitignore
vendored
@@ -17,6 +17,7 @@ transient/
|
|||||||
.dap-breakpoints
|
.dap-breakpoints
|
||||||
.lsp-session-v1
|
.lsp-session-v1
|
||||||
/.extension/**
|
/.extension/**
|
||||||
|
url/**
|
||||||
|
|
||||||
# Org-mode
|
# Org-mode
|
||||||
.org-id-locations
|
.org-id-locations
|
||||||
|
|||||||
@@ -201,17 +201,6 @@
|
|||||||
(user-error "No Go test at point"))
|
(user-error "No Go test at point"))
|
||||||
sym))
|
sym))
|
||||||
|
|
||||||
;; (with-eval-after-load 'dap-mode
|
|
||||||
;; (dap-register-debug-template
|
|
||||||
;; "Go :: Debug test at point (auto)"
|
|
||||||
;; (list :type "go"
|
|
||||||
;; :request "launch"
|
|
||||||
;; :name "Go :: Debug test at point"
|
|
||||||
;; :mode "test"
|
|
||||||
;; :program "${fileDirname}"
|
|
||||||
;; :cwd "${fileDirname}"
|
|
||||||
;; :args (list "-test.run" (lambda () (fscotto/go-test-at-point))))))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; PACKAGES ;;
|
;; PACKAGES ;;
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
@@ -362,11 +351,11 @@
|
|||||||
;; --------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------
|
||||||
(which-key-add-key-based-replacements
|
(which-key-add-key-based-replacements
|
||||||
"C-c d d" "Start debug session"
|
"C-c d d" "Start debug session"
|
||||||
"C-c d b" "Toggle breakpoint"
|
"C-c d b" "Toggle breakpoint")
|
||||||
"C-c d c" "Continue"
|
;; "C-c d c" "Continue"
|
||||||
"C-c d n" "Next"
|
;; "C-c d n" "Next"
|
||||||
"C-c d i" "Step in"
|
;; "C-c d i" "Step in"
|
||||||
"C-c d o" "Step out")
|
;; "C-c d o" "Step out")
|
||||||
|
|
||||||
;; --------------------------------------------------------------------------
|
;; --------------------------------------------------------------------------
|
||||||
;; Project (future)
|
;; Project (future)
|
||||||
@@ -815,19 +804,29 @@
|
|||||||
:hook (lsp-mode . dap-mode)
|
:hook (lsp-mode . dap-mode)
|
||||||
:init
|
:init
|
||||||
;; Enabling only some features
|
;; Enabling only some features
|
||||||
(setq dap-auto-configure-features '(sessions locals controls tooltip))
|
(setq dap-auto-configure-features '(sessions locals expressions repl))
|
||||||
:config
|
:config
|
||||||
(dap-mode 1)
|
(dap-mode 1)
|
||||||
(dap-ui-mode 1)
|
(dap-ui-mode 1)
|
||||||
(dap-ui-controls-mode 1)
|
(dap-ui-controls-mode 1)
|
||||||
(dap-tooltip-mode 1)
|
|
||||||
(tooltip-mode 1)
|
|
||||||
;; Auto show breakpoints + REPL
|
;; Auto show breakpoints + REPL
|
||||||
(setq dap-ui-buffer-configurations
|
(setq dap-ui-buffer-configurations
|
||||||
'((dap-ui-repl . ((side . right) (slot . 1) (window-width . 0.33)))
|
'(
|
||||||
(dap-ui-locals . ((side . right) (slot . 2) (window-width . 0.33)))
|
;; RIGHT SIDE — Debug data (like IntelliJ)
|
||||||
(dap-ui-breakpoints . ((side . left) (slot . 1) (window-width . 0.20)))))
|
(dap-ui-locals . ((side . right) (slot . 1) (window-width . 0.30)))
|
||||||
;; Loading DAP adapters
|
(dap-ui-sessions . ((side . right) (slot . 2) (window-width . 0.30)))
|
||||||
|
(dap-ui-expressions . ((side . right) (slot . 3) (window-width . 0.30)))
|
||||||
|
;; BOTTOM — Console / REPL
|
||||||
|
(dap-ui-repl . ((side . bottom) (slot . 1) (window-height . 0.25)))
|
||||||
|
(dap-ui-console . ((side . bottom) (slot . 2) (window-height . 0.25)))))
|
||||||
|
;; (setq dap-ui-buffer-configurations
|
||||||
|
;; '((dap-ui-repl . ((side . right) (slot . 1) (window-width . 0.33)))
|
||||||
|
;; (dap-ui-locals . ((side . right) (slot . 2) (window-width . 0.33)))
|
||||||
|
;; (dap-ui-breakpoints . ((side . left) (slot . 1) (window-width . 0.20)))))
|
||||||
|
;; (setq dap-ui-controls-screen-position 'top)
|
||||||
|
;; (setq dap-ui-repl-auto-focus nil)
|
||||||
|
;; (setq dap-ui-stackframes-auto-expand t)
|
||||||
|
;; ;; Loading DAP adapters
|
||||||
;; For C/C++
|
;; For C/C++
|
||||||
(require 'dap-cpptools)
|
(require 'dap-cpptools)
|
||||||
;; For Python
|
;; For Python
|
||||||
@@ -837,10 +836,10 @@
|
|||||||
(with-eval-after-load 'dap-mode
|
(with-eval-after-load 'dap-mode
|
||||||
(global-set-key (kbd "C-c d d") #'dap-debug)
|
(global-set-key (kbd "C-c d d") #'dap-debug)
|
||||||
(global-set-key (kbd "C-c d b") #'dap-breakpoint-toggle)
|
(global-set-key (kbd "C-c d b") #'dap-breakpoint-toggle)
|
||||||
(global-set-key (kbd "C-c d c") #'dap-continue)
|
(global-set-key (kbd "<f9>") #'dap-continue)
|
||||||
(global-set-key (kbd "C-c d n") #'dap-next)
|
(global-set-key (kbd "<f6>") #'dap-next)
|
||||||
(global-set-key (kbd "C-c d i") #'dap-step-in)
|
(global-set-key (kbd "<f5>") #'dap-step-in)
|
||||||
(global-set-key (kbd "C-c d o") #'dap-step-out)
|
(global-set-key (kbd "<f7>") #'dap-step-out)
|
||||||
(global-set-key (kbd "C-c d r") #'dap-restart-frame)
|
(global-set-key (kbd "C-c d r") #'dap-restart-frame)
|
||||||
(global-set-key (kbd "C-c d q") #'dap-disconnect))
|
(global-set-key (kbd "C-c d q") #'dap-disconnect))
|
||||||
|
|
||||||
@@ -879,6 +878,10 @@
|
|||||||
:cwd "${fileDirname}"
|
:cwd "${fileDirname}"
|
||||||
:args (list "-test.run" "${input:testName}"))))
|
:args (list "-test.run" "${input:testName}"))))
|
||||||
|
|
||||||
|
(add-hook 'dap-terminated-hook
|
||||||
|
(lambda (_)
|
||||||
|
(delete-other-windows)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
;; Formatters ;;
|
;; Formatters ;;
|
||||||
;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;
|
||||||
|
|||||||
Reference in New Issue
Block a user