use corfu
This commit is contained in:
parent
a0500746f4
commit
d7e51e32d5
5 changed files with 34 additions and 975 deletions
|
|
@ -13,19 +13,35 @@
|
|||
|
||||
(use-package yasnippet-snippets :ensure t :after (yasnippet))
|
||||
|
||||
|
||||
;; Corfu is the main engine for displaying suggestions.
|
||||
(use-package corfu :ensure t :defer t
|
||||
:hook ((elpaca-after-init . global-corfu-mode)
|
||||
(global-corfu-mode . corfu-popupinfo-mode))
|
||||
:config
|
||||
;; Go up to go the the last item on the list
|
||||
(setopt corfu-cycle t)
|
||||
|
||||
;; Show 20 corfu
|
||||
(setopt corfu-count 20)
|
||||
|
||||
;; Max width of the corfu frame
|
||||
(setopt corfu-max-width 120)
|
||||
|
||||
(setopt corfu-right-margin-width 0.5)
|
||||
(setopt corfu-left-margin-width 0.5)
|
||||
(setopt corfu-bar-width 0.5)
|
||||
(setopt corfu-auto-delay 0.2)
|
||||
(setopt corfu-popupinfo-delay '(0.4 . 0.2))
|
||||
(setopt corfu-auto t)
|
||||
(setopt corfu-quit-no-match 'separator))
|
||||
|
||||
;; Allow corfu to work in terminal
|
||||
(use-package corfu-terminal :ensure t :defer t
|
||||
:unless (display-graphic-p)
|
||||
:hook ((elpaca-after-init . corfu-terminal-mode)))
|
||||
|
||||
;; These are actual completions
|
||||
(use-package cape :ensure t :after corfu
|
||||
:commands (cape-dabbrev cape-file cape-elisp-symbol)
|
||||
:init
|
||||
|
|
@ -44,12 +60,10 @@
|
|||
(add-hook 'prog-mode-hook
|
||||
(lambda () (add-hook 'completion-at-point-functions #'yasnippet-capf))))
|
||||
|
||||
(use-package kind-icon
|
||||
:ensure t
|
||||
(use-package nerd-icons-corfu :ensure t
|
||||
:after corfu
|
||||
:config
|
||||
(declare-function kind-icon-margin-formatter kind-icon)
|
||||
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
|
||||
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter))
|
||||
|
||||
(provide 'icejam-complete-at-point)
|
||||
;;; icejam-complete-at-point.el ends here
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@
|
|||
(defvar elpaca-use-package)
|
||||
(elpaca elpaca-use-package (elpaca-use-package-mode))
|
||||
|
||||
(elpaca-load-lockfile (concat user-emacs-directory "elpaca.lock"))
|
||||
;; (elpaca-load-lockfile (concat user-emacs-directory "elpaca.lock"))
|
||||
|
||||
(use-package benchmark-init :ensure (:wait t)
|
||||
:config
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
(if (memq window-system '(x mac ns))
|
||||
(enable-theme 'icejam-base16-zenburn)
|
||||
(enable-theme 'icejam-base16-zenburn)))
|
||||
(enable-theme 'icejam-base16-zenburn)))
|
||||
|
||||
(provide 'icejam-themes)
|
||||
;;; icejam-themes.el ends here
|
||||
|
|
|
|||
|
|
@ -1,20 +1,13 @@
|
|||
;;; languages/elisp -- summary -*- lexical-binding: t; -*-
|
||||
;;; Commentary:
|
||||
;;; Code:
|
||||
|
||||
(require 'icejam-blocking)
|
||||
(require 'icejam-prog-mode)
|
||||
(require 'icejam-transient)
|
||||
|
||||
;; ;; Dash is a package that creates terse and more natural to me functions to
|
||||
;; ;; do basic things in Elisp.
|
||||
(declare-function elpaca-installed-p "elpaca")
|
||||
(unless (elpaca-installed-p 'dash)
|
||||
(use-package dash :ensure t :defer t))
|
||||
|
||||
;; ;; Adds pseudomodal editing for lisp.
|
||||
(unless (elpaca-installed-p 'lispy)
|
||||
(use-package lispy :ensure t :defer t))
|
||||
(use-package smartparens :ensure t :defer t
|
||||
:commands (smartparens-mode))
|
||||
|
||||
(declare-function column-enforce-n "column-enforce-mode" (number))
|
||||
(add-to-list 'auto-mode-alist '("/Eask\\'" . emacs-lisp-mode))
|
||||
|
|
@ -33,20 +26,23 @@
|
|||
(add-to-list
|
||||
'icejam-language-transient-alist '(emacs-lisp-mode . icejam-elisp-lang-menu))
|
||||
|
||||
(declare-function lispy-mode "lispy")
|
||||
(defun icejam-activate-emacs-lisp-mode ()
|
||||
"Goodies for editing Emacs files."
|
||||
(icejam-set-indent 2) ;; Default indentation of 2 characters
|
||||
|
||||
;; Default indentation of 2 characters
|
||||
(icejam-set-indent 2)
|
||||
|
||||
;; Use 80 char limit.
|
||||
(column-enforce-n 80)
|
||||
|
||||
(dash-fontify-mode t)
|
||||
(lispy-mode t)
|
||||
;; Parents
|
||||
(smartparens-mode t)
|
||||
|
||||
(setq-local completion-at-point-functions '(yasnippet-capf
|
||||
elisp-completion-at-point
|
||||
cape-dabbrev
|
||||
cape-file
|
||||
cape-elisp-symbol)))
|
||||
(setq-local completion-at-point-functions
|
||||
(list (cape-capf-super #'elisp-completion-at-point #'yasnippet-capf)
|
||||
#'cape-dabbrev
|
||||
#'cape-file
|
||||
#'cape-elisp-symbol)))
|
||||
|
||||
(add-hook 'emacs-lisp-mode-hook 'icejam-activate-emacs-lisp-mode)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue