diff --git a/init.el b/init.el index 7bea641..83a653a 100644 --- a/init.el +++ b/init.el @@ -1,4 +1,4 @@ -;; -*- lexical-binding: t; -*- +;;; -*- lexical-binding: t; -*- (require 'package) (add-to-list 'package-archives @@ -37,6 +37,8 @@ (setq-default tab-width 4) (set-face-attribute 'default nil :height 160 :family "Berkeley Mono") (global-hl-line-mode 1) +(pixel-scroll-precision-mode 1) +(kill-ring-deindent-mode 1) (setq use-package-always-ensure t) (setq mac-command-modifier 'control) @@ -44,14 +46,14 @@ (setq-default cursor-type 'bar) -(defun hgh/disable-bar-cursor () +(defun hgh/disable-cursor-blink () (blink-cursor-mode -1)) -(defun hgh/enable-bar-cursor () +(defun hgh/enable-cursor-blink () (blink-cursor-mode 1)) -(add-hook 'activate-mark-hook 'hgh/disable-bar-cursor) -(add-hook 'deactivate-mark-hook 'hgh/enable-bar-cursor) +(add-hook 'activate-mark-hook 'hgh/disable-cursor-blink) +(add-hook 'deactivate-mark-hook 'hgh/enable-cursor-blink) (when is-mac (setq dired-use-ls-dired t @@ -119,6 +121,24 @@ (load-theme 'modus-vivendi t) +;; Let's prefer completion-preview for now if it's available +(if (version<= "30.1" emacs-version) + (use-package completion-preview + :ensure nil + :demand t + :bind + (:map completion-preview-active-mode-map + ("M-n" . completion-preview-next-candidate) + ("M-p" . completion-preview-preview-candidate)) + :config + (global-completion-preview-mode t)) + (use-package corfu + :custom + (corfu-auto t) + (corfu-cycle t) + :config + (global-corfu-mode 1))) + (use-package exec-path-from-shell :when is-mac :config @@ -194,13 +214,6 @@ (setq completion-styles '(orderless basic) completion-category-overrides '((file (styles basic partial-completion))))) -(use-package corfu - :custom - (corfu-auto t) - (corfu-cycle t) - :config - (global-corfu-mode 1)) - (use-package cape :init (add-to-list 'completion-at-point-functions #'cape-dabbrev))