diff options
author | Guangxiong Lin <[email protected]> | 2022-07-08 22:12:27 +0800 |
---|---|---|
committer | Guangxiong Lin <[email protected]> | 2022-07-08 22:12:27 +0800 |
commit | 929f203ac89b254b23f64b29b5b4058f7d009bc5 (patch) | |
tree | 6db7bb2dd6f09ac94dffdb40747e52f61a96ad5e /.emacs.d/lisp/init-corfu.el | |
parent | e06f5cab66e1ff586e83f6f4f8871501fd4134d3 (diff) | |
download | dotfiles-929f203ac89b254b23f64b29b5b4058f7d009bc5.tar.gz dotfiles-929f203ac89b254b23f64b29b5b4058f7d009bc5.tar.bz2 dotfiles-929f203ac89b254b23f64b29b5b4058f7d009bc5.zip |
Update emacs config
Diffstat (limited to '.emacs.d/lisp/init-corfu.el')
-rw-r--r-- | .emacs.d/lisp/init-corfu.el | 10 |
1 files changed, 7 insertions, 3 deletions
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 |