diff --git a/.config/emacs/init.org b/.config/emacs/init.org index f2aba15..e3aeb66 100644 --- a/.config/emacs/init.org +++ b/.config/emacs/init.org @@ -556,10 +556,7 @@ Emacs is an great operating system, if only it had a good text editor... (kbd "C-h") 'evil-window-left (kbd "C-j") 'evil-window-down (kbd "C-k") 'evil-window-up - (kbd "C-l") 'evil-window-right - (kbd "tn") 'tab-new - (kbd "tc") 'tab-close - (kbd "tr") 'tab-rename))) + (kbd "C-l") 'evil-window-right))) ;; (define-prefix-command 'evil-consult-map) ;; (define-key evil-consult-map "b" 'evil-window-bottom-right) @@ -758,15 +755,17 @@ The theme of `C-x 4` bindings is that they operate on other windows, so this fun (setq tab-bar-mode t) (setq tab-bar-show nil) -(define-key global-map (kbd "M-1") '(lambda () (interactive) (tab-bar-select-tab 1))) -(define-key global-map (kbd "M-2") '(lambda () (interactive) (tab-bar-select-tab 2))) -(define-key global-map (kbd "M-3") '(lambda () (interactive) (tab-bar-select-tab 3))) -(define-key global-map (kbd "M-4") '(lambda () (interactive) (tab-bar-select-tab 4))) -(define-key global-map (kbd "M-5") '(lambda () (interactive) (tab-bar-select-tab 5))) -(define-key global-map (kbd "M-6") '(lambda () (interactive) (tab-bar-select-tab 6))) -(define-key global-map (kbd "M-7") '(lambda () (interactive) (tab-bar-select-tab 7))) -(define-key global-map (kbd "M-8") '(lambda () (interactive) (tab-bar-select-tab 8))) -(define-key global-map (kbd "M-9") '(lambda () (interactive) (tab-bar-select-tab 9))) +(evil-global-set-key 'normal (kbd "M-1") '(lambda () (interactive) (tab-bar-select-tab 1))) +(evil-global-set-key 'normal (kbd "M-2") '(lambda () (interactive) (tab-bar-select-tab 2))) +(evil-global-set-key 'normal (kbd "M-3") '(lambda () (interactive) (tab-bar-select-tab 3))) +(evil-global-set-key 'normal (kbd "M-4") '(lambda () (interactive) (tab-bar-select-tab 4))) +(evil-global-set-key 'normal (kbd "M-5") '(lambda () (interactive) (tab-bar-select-tab 5))) +(evil-global-set-key 'normal (kbd "M-6") '(lambda () (interactive) (tab-bar-select-tab 6))) +(evil-global-set-key 'normal (kbd "M-7") '(lambda () (interactive) (tab-bar-select-tab 7))) +(evil-global-set-key 'normal (kbd "M-8") '(lambda () (interactive) (tab-bar-select-tab 8))) +(evil-global-set-key 'normal (kbd "M-9") '(lambda () (interactive) (tab-bar-select-tab 9))) + +(evil-global-set-key 'normal (kbd "t") tab-prefix-map) #+end_src ** Projects #+begin_src emacs-lisp @@ -777,6 +776,9 @@ The theme of `C-x 4` bindings is that they operate on other windows, so this fun (project-try-vc dir)))) (add-hook 'project-find-functions #'joe/project-root-override) + +(evil-global-set-key 'normal (kbd "p") project-prefix-map) + #+end_src ** VEMCO @@ -980,7 +982,7 @@ targets." (kbd "M-s") #'dirvish-setup-menu (kbd "M-e") #'dirvish-emerge-menu (kbd "M-j") #'dirvish-fd-jump)) -) + (evil-global-set-key 'normal (kbd "-") #'dirvish-dwim) (global-set-key (kbd "C-x d") #'dirvish-dwim) (global-set-key (kbd "C-x C-d") #'joe/dirvish-find-directory) @@ -1084,6 +1086,8 @@ targets." (add-hook 'vterm-mode-hook (lambda () (define-key vterm-mode-map (kbd "C-c C-x") #'vterm-send-C-x) + (evil-define-key 'insert 'vterm-mode-map (kbd "C-w") #'vterm-send-C-w) + (evil-define-key 'insert 'vterm-mode-map (kbd "") #'vterm-send-delete) (setq-local global-hl-line-mode nil))) #+end_src @@ -1247,6 +1251,31 @@ startup. Reason we have to call this is so the vterm fucntion can call `vterm--i *** DAP #+begin_src emacs-lisp (straight-use-package 'dap-mode) +(require 'dap-mode) +;; (setq dap-auto-configure-features '(locals breakpoints expressions tooltip)) + +(require 'dap-cpptools) +(dap-cpptools-setup) +(add-hook 'dap-stopped-hook + (lambda (arg) (call-interactively #'dap-hydra))) + +(setq dap-cpptools-extension-version "1.12.1") + +(setq dap-default-terminal-kind "integrated") +(dap-auto-configure-mode +1) +(dap-register-debug-template + "Rust::CppTools Run Configuration" + (list :type "cppdbg" + :request "launch" + :name "Rust::Run" + :MIMode "gdb" + :miDebuggerPath "rust-gdb" + :environment [] + :program "${workspaceFolder}/target/debug/kanban-tui" + :cwd "${workspaceFolder}" + :console "external" + :dap-compilation "cargo build" + :dap-compilation-dir "${workspaceFolder}")) #+end_src ** Languages *** Rust