fix corfu, persistent scratch buffer
This commit is contained in:
parent
16fabb75ce
commit
c54036caca
|
|
@ -9,7 +9,7 @@
|
||||||
'("9fb561389e5ac5b9ead13a24fb4c2a3544910f67f12cfcfe77b75f36248017d0" "88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" "014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" "81f53ee9ddd3f8559f94c127c9327d578e264c574cda7c6d9daddaec226f87bb" "3770d0ae70172461ee0a02edcff71b7d480dc54066e8960d8de9367d12171efb" "f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33" "f079ef5189f9738cf5a2b4507bcaf83138ad22d9c9e32a537d61c9aae25502ef" "835d934a930142d408a50b27ed371ba3a9c5a30286297743b0d488e94b225c5f" default))
|
'("9fb561389e5ac5b9ead13a24fb4c2a3544910f67f12cfcfe77b75f36248017d0" "88f7ee5594021c60a4a6a1c275614103de8c1435d6d08cc58882f920e0cec65e" "aec7b55f2a13307a55517fdf08438863d694550565dee23181d2ebd973ebd6b8" "014cb63097fc7dbda3edf53eb09802237961cbb4c9e9abd705f23b86511b0a69" "81f53ee9ddd3f8559f94c127c9327d578e264c574cda7c6d9daddaec226f87bb" "3770d0ae70172461ee0a02edcff71b7d480dc54066e8960d8de9367d12171efb" "f64189544da6f16bab285747d04a92bd57c7e7813d8c24c30f382f087d460a33" "f079ef5189f9738cf5a2b4507bcaf83138ad22d9c9e32a537d61c9aae25502ef" "835d934a930142d408a50b27ed371ba3a9c5a30286297743b0d488e94b225c5f" default))
|
||||||
'(elfeed-feeds '("https://hnrss.org/newest"))
|
'(elfeed-feeds '("https://hnrss.org/newest"))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(cape kind-icon corfu eat eshell-toggle eshell-git-prompt eshell-bookmark eshell-autojump eshell-atuin elfeed vertico orderless plz ace-mc ace-jump-mode flycheck fic-mode kotlin-mode rego-mode protobuf-mode multi-web-mode mmm-mode python-mode php-mode json-mode yaml-mode go-mode plantuml-mode graphviz-dot-mode magit denote unicode-fonts nerd-icons-ibuffer nerd-icons-completion nerd-icons-dired doom-modeline which-key multiple-cursors dash async-status async consult-projectile)))
|
'(persistent-scratch scratch cape kind-icon corfu eat eshell-toggle eshell-git-prompt eshell-bookmark eshell-autojump eshell-atuin elfeed vertico orderless plz ace-mc ace-jump-mode flycheck fic-mode kotlin-mode rego-mode protobuf-mode multi-web-mode mmm-mode python-mode php-mode json-mode yaml-mode go-mode plantuml-mode graphviz-dot-mode magit denote unicode-fonts nerd-icons-ibuffer nerd-icons-completion nerd-icons-dired doom-modeline which-key multiple-cursors dash async-status async consult-projectile)))
|
||||||
(custom-set-faces
|
(custom-set-faces
|
||||||
;; custom-set-faces was added by Custom.
|
;; custom-set-faces was added by Custom.
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
;; If you edit it by hand, you could mess it up, so be careful.
|
||||||
|
|
|
||||||
|
|
@ -427,16 +427,6 @@
|
||||||
:ensure t
|
:ensure t
|
||||||
:demand t
|
:demand t
|
||||||
:bind ("C-." . completion-at-point)
|
:bind ("C-." . completion-at-point)
|
||||||
:custom
|
|
||||||
(corfu-auto t) ;; Enable auto completion
|
|
||||||
(corfu-separator ?\s) ;; Orderless field separator
|
|
||||||
(corfu-quit-at-boundary nil) ;; Never quit at completion boundary
|
|
||||||
(corfu-quit-no-match nil) ;; Never quit, even if there is no match
|
|
||||||
(corfu-preview-current nil) ;; Disable current candidate preview
|
|
||||||
(corfu-on-exact-match nil) ;; Configure handling of exact matches
|
|
||||||
(corfu-echo-documentation nil) ;; Disable documentation in the echo area
|
|
||||||
(corfu-scroll-margin 5) ;; Use scroll margin
|
|
||||||
|
|
||||||
:init
|
:init
|
||||||
(global-corfu-mode)
|
(global-corfu-mode)
|
||||||
|
|
||||||
|
|
@ -448,9 +438,19 @@
|
||||||
completion-category-defaults nil
|
completion-category-defaults nil
|
||||||
completion-at-point-functions nil
|
completion-at-point-functions nil
|
||||||
completion-category-overrides '((file (styles . (partial-completion)))))
|
completion-category-overrides '((file (styles . (partial-completion)))))
|
||||||
|
|
||||||
|
(setq corfu-auto t) ;; Enable auto completion
|
||||||
|
(setq corfu-separator ?\s) ;; Orderless field separator
|
||||||
|
(setq corfu-quit-at-boundary nil) ;; Never quit at completion boundary
|
||||||
|
(setq corfu-quit-no-match nil) ;; Never quit, even if there is no match
|
||||||
|
(setq corfu-preview-current nil) ;; Disable current candidate preview
|
||||||
|
(setq corfu-on-exact-match nil) ;; Configure handling of exact matches
|
||||||
|
(setq corfu-echo-documentation nil) ;; Disable documentation in the echo area
|
||||||
|
(setq corfu-scroll-margin 5) ;; Use scroll margin
|
||||||
|
|
||||||
|
|
||||||
;; Set up dabbrev as the primary completion source
|
;; Set up dabbrev as the primary completion source
|
||||||
(setq-local completion-at-point-functions '(dabbrev-completion))
|
;; (setq-local completion-at-point-functions '(dabbrev-completion))
|
||||||
|
|
||||||
;; Enable kind-icon
|
;; Enable kind-icon
|
||||||
(use-package kind-icon
|
(use-package kind-icon
|
||||||
|
|
@ -579,5 +579,30 @@
|
||||||
|
|
||||||
(use-package eat :ensure t :defer t)
|
(use-package eat :ensure t :defer t)
|
||||||
|
|
||||||
|
(use-package scratch :ensure t :defer t
|
||||||
|
:bind (("C-;" . scratch)))
|
||||||
|
|
||||||
|
(defun my-set-scratch-mode ()
|
||||||
|
(funcall 'text-mode))
|
||||||
|
|
||||||
|
(add-hook 'scratch-create-buffer-hook 'my-set-scratch-mode)
|
||||||
|
|
||||||
|
(use-package persistent-scratch
|
||||||
|
:ensure t
|
||||||
|
:init
|
||||||
|
(setq persistent-scratch-directory "~/.local/state/emacs/")
|
||||||
|
(unless (file-exists-p persistent-scratch-directory)
|
||||||
|
(make-directory persistent-scratch-directory t))
|
||||||
|
:config
|
||||||
|
(persistent-scratch-setup-default)
|
||||||
|
:custom
|
||||||
|
(persistent-scratch-autosave-interval 30)
|
||||||
|
(persistent-scratch-save-file
|
||||||
|
(expand-file-name "scratch" persistent-scratch-directory))
|
||||||
|
(persistent-scratch-what-to-save
|
||||||
|
'(((:current . "*scratch*") . (major-mode point narrowing))))
|
||||||
|
:hook
|
||||||
|
(after-init . persistent-scratch-autosave-mode)
|
||||||
|
:bind
|
||||||
|
(("C-c s" . persistent-scratch-save)
|
||||||
|
("C-c r" . persistent-scratch-restore)))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue