Gered
7b5f1cc6b5
the problem i have with this package is the colour used for the highlight is the same as the mark/selection colour, which gets super annoying when using expand-region to copy a name or something
75 lines
1.7 KiB
EmacsLisp
75 lines
1.7 KiB
EmacsLisp
(use-package emacs
|
|
:ensure nil
|
|
:hook ((prog-mode . electric-pair-mode)))
|
|
|
|
;; (use-package idle-highlight-mode
|
|
;; :ensure t
|
|
;; :hook ((prog-mode . idle-highlight-mode)))
|
|
|
|
(use-package treesit-auto
|
|
:ensure t
|
|
:custom
|
|
(treesit-auto-install 'prompt)
|
|
:config
|
|
(treesit-auto-add-to-auto-mode-alist 'all)
|
|
(global-treesit-auto-mode))
|
|
|
|
(defun gud-quit ()
|
|
"Quits out of the current GDB session."
|
|
(interactive)
|
|
(gud-basic-call "quit"))
|
|
|
|
(defun gud-start ()
|
|
"Starts execution of the program in GDB."
|
|
(interactive)
|
|
(gud-basic-call "start"))
|
|
|
|
(defun gud-kill ()
|
|
"Terminates execution of the running program in GDB."
|
|
(interactive)
|
|
(gud-basic-call "kill"))
|
|
|
|
(defun gud-step-into ()
|
|
"Steps execution to the next line."
|
|
(interactive)
|
|
(gud-step 1))
|
|
|
|
(defun gud-step-over ()
|
|
"Steps execution to the next line, skipping over functions."
|
|
(interactive)
|
|
(gud-next 1))
|
|
|
|
(defun gud-step-out ()
|
|
"Steps execution out of the current function."
|
|
(interactive)
|
|
(gud-finish 1))
|
|
|
|
(defun gud-set-breakpoint ()
|
|
"Sets a debugger breakpoint on the current line."
|
|
(interactive)
|
|
(gud-break 1))
|
|
|
|
(defun gud-remove-breakpoint ()
|
|
"Removes a debugger breakpoint from the current line."
|
|
(interactive)
|
|
(gud-remove 1))
|
|
|
|
(use-package gdb-mi
|
|
:bind
|
|
( :map gud-minor-mode-map
|
|
("<f5>" . 'gud-start)
|
|
("S-<f5>" . 'gud-kill)
|
|
("<f9>" . 'gud-cont)
|
|
("<f7>" . 'gud-step-into)
|
|
("<f8>" . 'gud-step-over)
|
|
("S-<f8>" . 'gud-step-out)
|
|
("C-c b" . 'gud-set-breakpoint)
|
|
("C-c B" . 'gud-remove-breakpoint)
|
|
("C-q" . 'gud-quit))
|
|
:config
|
|
(setq gdb-many-windows t)
|
|
(setq gdb-restore-window-configuration-after-quit 'if-gdb-many-windows)
|
|
(setq gdb-debuginfod-enable-setting nil)
|
|
(gud-tooltip-mode t))
|
|
|