diff --git a/init.el b/init.el index 917f800..4960d55 100644 --- a/init.el +++ b/init.el @@ -163,23 +163,6 @@ (require 'find-dired) (setq find-ls-option '("-print0 | xargs -0 ls -ld" . "-ld")) -;; ;; hippie expand stuff: M-/ to expand things -;; (bind-key "M-/" 'hippie-expand) -;; (defun sanityinc/dabbrev-friend-buffer (other-buffer) -;; (< (buffer-size other-buffer) (* 1 1024 1024))) -;; (setq dabbrev-friend-buffer-function 'sanityinc/dabbrev-friend-buffer) -;; (setq hippie-expand-try-functions-list -;; '(try-expand-all-abbrevs -;; try-complete-file-name-partially -;; try-complete-file-name -;; try-expand-dabbrev -;; try-expand-dabbrev-from-kill -;; try-expand-dabbrev-all-buffers -;; try-expand-list -;; try-expand-line -;; try-complete-lisp-symbol-partially -;; try-complete-lisp-symbol)) - ;; comment regions using C-c # (uncomment with C-u C-c #) (global-set-key "\C-c#" 'comment-region) (setq comment-empty-lines nil) @@ -223,7 +206,6 @@ (use-package racket-mode) (use-package tuareg) (use-package forth-mode) - (use-package rust-mode) (use-package which-key @@ -385,9 +367,27 @@ ;; magit (use-package magit :commands magit-status magit-blame - :init (setq magit-revert-buffers nil) :bind (("C-x g" . magit-status) - ("s-b" . magit-blame))) + ("s-b" . magit-blame)) + :init + ;; Have magit-status go full screen and quit to previous + ;; configuration. Taken from + ;; http://whattheemacsd.com/setup-magit.el-01.html#comment-748135498 + ;; and http://irreal.org/blog/?p=2253 + (defadvice magit-status (around magit-fullscreen activate) + (window-configuration-to-register :magit-fullscreen) + ad-do-it + (delete-other-windows)) + (defadvice magit-quit-window (after magit-restore-screen activate) + (jump-to-register :magit-fullscreen)) + :config (remove-hook 'magit-status-sections-hook 'magit-insert-tags-header) + (remove-hook 'magit-status-sections-hook 'magit-insert-status-headers) + (remove-hook 'magit-status-sections-hook 'magit-insert-unpushed-to-pushremote) + (remove-hook 'magit-status-sections-hook 'magit-insert-unpulled-from-pushremote) + (remove-hook 'magit-status-sections-hook 'magit-insert-unpulled-from-upstream) + (remove-hook 'magit-status-sections-hook 'magit-insert-unpushed-to-upstream-or-recent) + (setq magit-refresh-verbose t ; xyz + magit-revert-buffers nil)) (use-package org-roam :if (equal (system-name) "cult") @@ -404,8 +404,7 @@ (global-set-key (kbd "C-x n") 'git-gutter:next-hunk)) ;; git-timemachine -(use-package git-timemachine - :config (add-hook 'git-timemachine-mode-hook (lambda () (ensime-mode 0)))) +(use-package git-timemachine) ;; json (use-package json-mode)