Adding magit and making things smoother

This commit is contained in:
Chris Cochrun 2021-02-16 11:07:57 -06:00
parent d5146d9bd5
commit e269e493d2
2 changed files with 25 additions and 1 deletions

View file

@ -190,7 +190,7 @@ This evil-collection package includes a lot of other evil based things.
*** SELECTRUM *** SELECTRUM
I prefer selectrum over Ivy or Helm for completions. It is using the basic completing read system and therefore it is more inline with basic emacs. Also, let's add prescient to be able to filter selectrum well. We'll add some keybindings too for easier navigation on the home row. I prefer selectrum over Ivy or Helm for completions. It is using the basic completing read system and therefore it is more inline with basic emacs. Also, let's add prescient to be able to filter selectrum well. We'll add some keybindings too for easier navigation on the home row.
#+BEGIN_SRC elisp #+BEGIN_SRC emacs-lisp
(use-package selectrum (use-package selectrum
:init :init
(selectrum-mode +1) (selectrum-mode +1)
@ -338,6 +338,7 @@ Need to setup auto tangle yes
#+end_src #+end_src
** Magit ** Magit
Use magit, because why wouldn't you? duh!
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package magit (use-package magit
:commands (magit-status magit-get-current-branch) :commands (magit-status magit-get-current-branch)

23
init.el
View file

@ -80,12 +80,18 @@
:keymaps '(normal visual emacs) :keymaps '(normal visual emacs)
:prefix "SPC") :prefix "SPC")
(chris/leader-keys (chris/leader-keys
"b" '(:ignore t :which-key "buffer")
"t" '(:ignore t :which-key "toggle") "t" '(:ignore t :which-key "toggle")
"f" '(:ignore t :which-key "file") "f" '(:ignore t :which-key "file")
"w" '(:ignore t :which-key "window") "w" '(:ignore t :which-key "window")
"s" '(:ignore t :which-key "search")
"o" '(:ignore t :which-key "open")
"bs" '(consult-buffer :which-key "buffer search")
"tt" '(consult-theme :which-key "choose theme") "tt" '(consult-theme :which-key "choose theme")
"ff" '(find-file :which-key "find file") "ff" '(find-file :which-key "find file")
"fs" '(save-buffer :which-key "save") "fs" '(save-buffer :which-key "save")
"od" '(dired-jump :which-key "dired jump")
"ss" '(consult-line :which-key "consult search")
"ww" '(other-window :which-key "other window") "ww" '(other-window :which-key "other window")
)) ))
@ -94,6 +100,18 @@
:init (evil-escape-mode +1) :init (evil-escape-mode +1)
:config (setq evil-escape-key-sequence "fd")) :config (setq evil-escape-key-sequence "fd"))
(use-package selectrum
:init
(selectrum-mode +1)
:config
(general-define-key
:keymaps 'selectrum-minibuffer-map
"C-j" 'selectrum-next-candidate
"C-k" 'selectrum-previous-candidate
"C-S-j" 'selectrum-goto-end
"C-S-k" 'selectrum-goto-beginning
"TAB" 'selectrum-insert-current-candidate))
(use-package prescient (use-package prescient
:config :config
(prescient-persist-mode +1)) (prescient-persist-mode +1))
@ -136,3 +154,8 @@
(org-babel-tangle)))) (org-babel-tangle))))
(add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'chris/org-babel-tangle-config)))) (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'chris/org-babel-tangle-config))))
(use-package magit
:commands (magit-status magit-get-current-branch)
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1))