diff options
Diffstat (limited to 'home/dots')
-rw-r--r-- | home/dots/.emacs | 59 |
1 files changed, 38 insertions, 21 deletions
diff --git a/home/dots/.emacs b/home/dots/.emacs index b3067bb..3998622 100644 --- a/home/dots/.emacs +++ b/home/dots/.emacs @@ -8,11 +8,13 @@ ;; undo undo-limit 10000000 undo-outer-limit 20000000 + tab-always-indent 'complete + text-mode-ispell-word-completion nil ;; Package list package-list '(almost-mono-themes avy - company + corfu devdocs diminish ednc @@ -42,7 +44,8 @@ tldr transpose-frame yasnippet - yasnippet-snippets) + yasnippet-snippets + ws-butler) package-archives '(("elpa" . "https://elpa.gnu.org") ("gnu" . "http://elpa.gnu.org/packages/") @@ -51,6 +54,7 @@ ("melpa-stable" . "https://stable.melpa.org/packages/"))) +(read-extended-command-predicate #'command-completion-default-include-p) ;; UI (menu-bar-mode -1) (tool-bar-mode -1) @@ -200,27 +204,34 @@ :init (pixel-scroll-precision-mode)) -(use-package company - :diminish company-mode - :ensure t +(use-package corfu + ;; Optional customizations + :custom + (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' + ;; (corfu-auto t) ;; Enable auto completion + ;; (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-preselect 'prompt) ;; Preselect the prompt + ;; (corfu-on-exact-match nil) ;; Configure handling of exact matches + + ;; Recommended: Enable Corfu globally. This is recommended since Dabbrev can + ;; be used globally (M-/). See also the customization variable + ;; `global-corfu-modes' to exclude certain modes. :init - (global-company-mode) - :config - ;; Disable auto start behavior - (setq company-idle-delay nil) - :bind - (("M-<tab>" . company-indent-or-complete-common) - ("C-M-i" . company-complete) - :map company-active-map - ("C-n" . nil) - ("C-p" . nil) - ("M-<ret>" . company-complete-selection) - ("M-<tab>" . company-complete-common-or-cycle) - ("<tab>" . company-complete-common-or-cycle) - ("<backtab>" . (lambda () - (interactive) - (company-complete-common-or-cycle -1))))) + (global-corfu-mode)) +(use-package dabbrev + ;; Swap M-/ and C-M-/ + :bind (("M-/" . dabbrev-completion) + ("C-M-/" . dabbrev-expand)) + :config + (add-to-list 'dabbrev-ignored-buffer-regexps "\\` ") + ;; Since 29.1, use `dabbrev-ignored-buffer-regexps' on older. + (add-to-list 'dabbrev-ignored-buffer-modes 'doc-view-mode) + (add-to-list 'dabbrev-ignored-buffer-modes 'pdf-view-mode) + (add-to-list 'dabbrev-ignored-buffer-modes 'tags-table-mode)) + (use-package scroll-bar :init (scroll-bar-mode -1)) @@ -588,6 +599,12 @@ (interactive) (async-shell-command "guix home reconfigure ~/system/home/config.scm"))))) +(use-package ws-butler + :ensure t + :diminish ws-butler-mode + :hook + ((prog-mode . ws-butler-mode))) + (use-package sgml-mode :init (add-to-list 'auto-mode-alist '("\\.njk\\'" . html-mode)) |