style(config): Reformat Emacs Lisp code for consistency
Standardize formatting across multiple init files: expand single-line use-package keywords onto separate lines, fix indentation, remove outdated comments, and clean up whitespace. Also adds mc/keymap <return> binding and improves fcitx5 startup logic in EXWM.
This commit is contained in:
@@ -6,25 +6,29 @@
|
||||
|
||||
;; eglot
|
||||
(use-package eglot
|
||||
:hook ((python-mode . eglot-ensure)
|
||||
;; (scheme-mode . eglot-ensure)
|
||||
)
|
||||
:hook
|
||||
((python-mode . eglot-ensure)
|
||||
;; (scheme-mode . eglot-ensure)
|
||||
)
|
||||
:config
|
||||
(setq eglot-send-changes-idle-time 0.25)
|
||||
(add-to-list 'eglot-server-programs
|
||||
'(scheme-mode . ("guile-lsp-server")))
|
||||
|
||||
(add-hook 'eglot-managed-mode-hook ;; 在scheme模式禁用eglot补全,保留其他功能
|
||||
(lambda ()
|
||||
(when (derived-mode-p 'scheme-mode)
|
||||
(setq-local completion-at-point-functions
|
||||
(remq 'eglot-completion-at-point
|
||||
completion-at-point-functions))))))
|
||||
;; 在scheme模式禁用eglot补全,保留其他功能
|
||||
(add-hook 'eglot-managed-mode-hook
|
||||
(lambda ()
|
||||
(when (derived-mode-p 'scheme-mode)
|
||||
(setq-local completion-at-point-functions
|
||||
(remq 'eglot-completion-at-point
|
||||
completion-at-point-functions))))))
|
||||
|
||||
;; corfu
|
||||
(use-package corfu
|
||||
:autoload (corfu-quit consult-completion-in-region)
|
||||
:functions (persistent-scratch-save)
|
||||
:autoload
|
||||
(corfu-quit consult-completion-in-region)
|
||||
:functions
|
||||
(persistent-scratch-save)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-prefix 2)
|
||||
@@ -47,8 +51,9 @@
|
||||
;;Quit completion before saving
|
||||
(add-hook 'before-save-hook #'corfu-quit)
|
||||
(advice-add #'persistent-scratch-save :before #'corfu-quit)
|
||||
:bind (:map corfu-map
|
||||
("RET" . nil)))
|
||||
:bind
|
||||
(:map corfu-map
|
||||
("RET" . nil)))
|
||||
|
||||
;; 在eshell中使用tab打开补全
|
||||
(add-hook 'eshell-mode-hook
|
||||
|
||||
Reference in New Issue
Block a user