diff --git a/init.el b/init.el index 755bf4d..8e3a989 100644 --- a/init.el +++ b/init.el @@ -101,6 +101,17 @@ ;; Banish customizations to another file (setq custom-file (concat user-emacs-directory "custom.el")) +;; Scoll 1 line at a time +(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) + +;; Delete old buffers +;; https://www.emacswiki.org/emacs/CleanBufferList +(use-package midnight + :config + (setq midnight-period "2 hours" ; Clean every 2 hours + clean-buffer-list-delay-general 1)) ; Clean normal buffers after 1 day + + ;;;;;;;;;;;;;;;;;;;; Keybindings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Scroll in other window (global-set-key (kbd "S-") 'scroll-other-window-down) @@ -290,10 +301,19 @@ (use-package fill-column-indicator :after company :config - ;; TODO: Find out why I can't put this in :init or :config + ;; ;; TODO: Find out why I can't put this in :init or :config ;; (define-globalized-minor-mode global-fci-mode fci-mode - ;; (lambda () (fci-mode 1))) + ;; (lambda () (fci-mode t))) ;; (global-fci-mode t) + + ;; Fix bug with fci + company + (defun on-off-fci-before-company(command) + (when (string= "show" command) + (turn-off-fci-mode)) + (when (string= "hide" command) + (turn-on-fci-mode))) + (advice-add 'company-call-frontends :before #'on-off-fci-before-company) + ;; Add global fci-mode :hook (prog-mode . fci-mode) (text-mode . fci-mode)