From 49a92ebf94e3c6f5900f0e56fa5772188a147d6b Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Mon, 8 Jan 2024 16:26:25 -0800 Subject: [PATCH] Added realgud config --- init.el | 50 ++++++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/init.el b/init.el index 4abd181..f8979df 100644 --- a/init.el +++ b/init.el @@ -145,22 +145,6 @@ icon-preference '(symbol text image emoji)) (tab-bar-mode 1)) -;; c-ts-mode -(use-package c-ts-mode - :after evil - :init - (setq-default c-ts-mode-indent-offset 4) - :config - (evil-define-key 'normal 'c-ts-mode-map - "go" #'ff-find-other-file - "gO" #'ff-find-other-file-other-window) - (evil-define-key 'normal 'c++-ts-mode-map - "go" #'ff-find-other-file - "gO" #'ff-find-other-file-other-window) - (evil-define-key 'normal 'objc-mode-map - "go" #'ff-find-other-file - "gO" #'ff-find-other-file-other-window)) - ;; flyspell (use-package flyspell :config @@ -191,6 +175,7 @@ (use-package evil :init (setq evil-want-integration t + evil-want-C-d-scroll nil evil-want-keybinding nil evil-undo-system 'undo-redo evil-search-module 'isearch @@ -496,6 +481,17 @@ visual states." "--header-insertion=never" "--pch-storage=memory" "--malloc-trim" "--function-arg-placeholders")))) +(use-package realgud + :hook (realgud-short-key-mode . my/-realgud-setup-shortkey-mode) + :bind (:map realgud:shortkey-mode-map + ("a" . realgud:cmd-frame)) + :init + (setq realgud-srcbuf-lock t + realgud-short-key-on-tracing? t) + (defun my/-realgud-setup-shortkey-mode () + (when realgud-short-key-mode + (keymap-local-set "C-d" realgud:shortkey-mode-map)))) + ;; yasnippet (use-package yasnippet :bind ("C-c s" . yas-expand) @@ -592,6 +588,28 @@ COMMAND and COMINT are like `compile'." (use-package blueprint-ts-mode :after eglot) +;; c-ts-mode +(use-package c-ts-mode + :after evil + :bind (:map c-ts-mode-map + ("C-c d" . realgud:gdb) + :map c++-ts-mode-map + ("C-c d" . realgud:gdb) + :map objc-mode-map + ("C-c d" . realgud:gdb)) + :init + (setq-default c-ts-mode-indent-offset 4) + :config + (evil-define-key 'normal 'c-ts-mode-map + "go" #'ff-find-other-file + "gO" #'ff-find-other-file-other-window) + (evil-define-key 'normal 'c++-ts-mode-map + "go" #'ff-find-other-file + "gO" #'ff-find-other-file-other-window) + (evil-define-key 'normal 'objc-mode-map + "go" #'ff-find-other-file + "gO" #'ff-find-other-file-other-window)) + ;; rust (use-package rust-mode)