From 929f203ac89b254b23f64b29b5b4058f7d009bc5 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Fri, 8 Jul 2022 22:12:27 +0800 Subject: Update emacs config --- .emacs.d/lisp/init-corfu.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to '.emacs.d/lisp/init-corfu.el') diff --git a/.emacs.d/lisp/init-corfu.el b/.emacs.d/lisp/init-corfu.el index 7b5899d..9acf9d7 100644 --- a/.emacs.d/lisp/init-corfu.el +++ b/.emacs.d/lisp/init-corfu.el @@ -1,10 +1,14 @@ ;; -*- lexical-binding: t; -*- (when (gx/maybe-require-package 'corfu) - (autoload 'corfu-mode "corfu") + (add-hook 'gdscript-mode-hook #'gx/enable-corfu-only-in-gui) + (add-hook 'ledger-mode-hook #'gx/enable-corfu-only-in-gui) + (add-hook 'prog-mode-hook #'gx/enable-corfu-only-in-gui)) + +(defun gx/enable-corfu-only-in-gui () + "Enable Corfu Only In GUI mode." (when (display-graphic-p) - (add-hook 'ledger-mode-hook #'corfu-mode) - (add-hook 'prog-mode-hook #'corfu-mode))) + (corfu-mode))) (setq corfu-cycle t corfu-auto t -- cgit v1.2.3