diff --git a/home/emacs/init.el b/home/emacs/init.el index adc625e6..f8276a22 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -418,7 +418,8 @@ eglot-autoshutdown t eglot-autoreconnect nil) (when (require 'eglot nil :noerror) - (add-hook 'prog-mode-hook #'eglot-ensure)) + (add-hook 'prog-mode-hook #'eglot-ensure) + (keymap-global-set "C-c c e" #'eglot)) (setq project-switch-use-entire-map t project-switch-commands @@ -428,11 +429,22 @@ (project-find-dir "Find directory") (project-eshell "Eshell"))) -(setq magit-clone-default-directory "~/Projects/" +(setq magit-define-global-key-bindings nil + magit-clone-default-directory "~/Projects/" magit-commit-show-diff nil magit-commit-diff-inhibit-same-window t) (use-package magit - :ensure t) + :ensure t + :bind (("C-c C-g" . magit-status) + ("C-c g g" . magit-status) + ("C-c g d" . magit-dispatch) + ("C-c g f" . magit-file-dispatch) + ("C-c g p" . magit-pull) + ("C-c g P" . magit-push) + :map project-prefix-map + ("m" . magit-project-status)) + :config + (add-to-list 'project-switch-commands '(magit-project-status "Magit") t)) (setq vertico-cycle t) (use-package vertico diff --git a/home/emacs/init.org b/home/emacs/init.org index d86749c8..a0573757 100644 --- a/home/emacs/init.org +++ b/home/emacs/init.org @@ -491,7 +491,8 @@ For reference information, see [[https://orgmode.com][Org-mode website]] eglot-autoshutdown t eglot-autoreconnect nil) (when (require 'eglot nil :noerror) - (add-hook 'prog-mode-hook #'eglot-ensure)) + (add-hook 'prog-mode-hook #'eglot-ensure) + (keymap-global-set "C-c c e" #'eglot)) #+END_SRC ** Project #+BEGIN_SRC emacs-lisp @@ -506,11 +507,23 @@ For reference information, see [[https://orgmode.com][Org-mode website]] ** Version control *** Magit #+begin_src emacs-lisp - (setq magit-clone-default-directory "~/Projects/" + (setq magit-define-global-key-bindings nil + magit-clone-default-directory "~/Projects/" magit-commit-show-diff nil magit-commit-diff-inhibit-same-window t) (use-package magit - :ensure t) + :ensure t + :bind (("C-c C-g" . magit-status) + ("C-c g g" . magit-status) + ("C-c g d" . magit-dispatch) + ("C-c g f" . magit-file-dispatch) + ("C-c g p" . magit-pull) + ("C-c g P" . magit-push) + ("