diff options
author | jao <jao@gnu.org> | 2021-03-27 03:55:21 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-03-27 03:55:21 +0000 |
commit | 8a438d164f17f5261da39231cd0e903b85f62d8d (patch) | |
tree | 613d3f44c11e9872413997f7f4eb676e9b09c206 | |
parent | 3d1d6772f410ddc0ae7c36442f5be43847a8e432 (diff) | |
download | elibs-8a438d164f17f5261da39231cd0e903b85f62d8d.tar.gz elibs-8a438d164f17f5261da39231cd0e903b85f62d8d.tar.bz2 |
clean-ups
-rw-r--r-- | consult.org | 10 | ||||
-rw-r--r-- | exwm.org | 8 | ||||
-rw-r--r-- | init.org | 55 |
3 files changed, 29 insertions, 44 deletions
diff --git a/consult.org b/consult.org index 72e30cc..d4854aa 100644 --- a/consult.org +++ b/consult.org @@ -1,13 +1,17 @@ #+title: Completion configuration using selectrum, consult and friends -* completion styles: orderless +* completion styles #+begin_src emacs-lisp + (setq completion-styles '(basic partial-completion emacs22)) + #+end_src +* completion styles: orderless + #+begin_src emacs-lisp :load no (use-package orderless :ensure t - :custom ((completion-styles '(basic partial-completion emacs22)) + :custom ((completion-styles '(orderless)) + (orderless-component-separator "[ -/]+") (orderless-matching-styles '(orderless-literal orderless-regexp orderless-initialism))) - :init :bind ((:map minibuffer-local-completion-map ("SPC" . self-insert-command)))) #+end_src @@ -16,7 +16,7 @@ (use-package exwm-edit :ensure t) (require 'exwm) #+end_src -* Frames as workspaces +* Frame(s) as workspaces #+begin_src emacs-lisp (defun jao-exwm--new-frame-p () (not (frame-parameter nil 'jao-frames-initialized))) @@ -75,8 +75,8 @@ #+begin_src emacs-lisp (add-hook 'exwm-workspace-switch-hook 'tracking-remove-visible-buffers) #+end_src -* Buffer titles - #+BEGIN_SRC emacs-lisp +* Buffer names + #+begin_src emacs-lisp (defun jao-exwm--use-title-p () (or (string-prefix-p "sun-awt-X11-" exwm-instance-name) (string= "Navigator" exwm-instance-name) @@ -104,7 +104,7 @@ (add-hook 'exwm-mode-hook 'jao-exwm--set-exwm-name) (add-hook 'exwm-update-class-hook 'jao-exwm-rename-buffer/class) (add-hook 'exwm-update-title-hook 'jao-exwm-rename-buffer/title) - #+END_SRC + #+end_src * Float windows #+begin_src emacs-lisp (defvar jao-exwm-max-x (x-display-pixel-width)) @@ -231,10 +231,6 @@ (string-trim)))) #+end_src -*** Memory usage - #+begin_src emacs-lisp - (use-package memory-usage :ensure t) - #+end_src *** Keyboard and hydra #+begin_src emacs-lisp @@ -872,18 +868,13 @@ (setq company-require-match #'company-explicit-action-p) (defun jao-complete-at-point () + "Complete using company unless we're in the minibuffer." (interactive) (if (window-minibuffer-p) (completion-at-point) (company-manual-begin))) - :bind (;; Remap the standard Emacs keybindings for invoking - ;; completion to instead use Company. You might think this - ;; could be put in the `:bind*' declaration below, but it - ;; seems that `bind-key*' does not work with remappings. - ([remap completion-at-point] . #'jao-complete-at-point) + :bind (([remap completion-at-point] . #'jao-complete-at-point) ([remap complete-symbol] . #'jao-complete-at-point) - ("C-c ." . company-complete) - ;; The following are keybindings that take effect whenever ;; the completions menu is visible, even if the user has not ;; explicitly interacted with Company. @@ -894,35 +885,25 @@ ("<tab>" . #'company-complete-selection) ("TAB" . #'company-complete-selection) - ;; When was the last time you used the C-s binding for - ;; searching candidates? It conflicts with buffer search, - ;; anyway. Same for the scroll commands. - ("C-s" . nil) - ([remap scroll-down-command] . nil) - ([remap scroll-up-command] . nil) - - ("C-h" . company-show-doc-buffer) - ("M-." . company-show-location) + ("C-h" . #'company-show-doc-buffer) + ("M-." . #'company-show-location) - ;; The following are keybindings that only take effect if the - ;; user has explicitly interacted with Company. Note that - ;; `:map' from above is "sticky", and applies also below: see - ;; https://github.com/jwiegley/use-package/issues/334#issuecomment-349473819. + ;; The following are keybindings that only take effect + ;; if not in eshell. Note that `:map' from above is + ;; "sticky", and applies also below. + ;; Another interesting :filter (company-explicit-action-p) - :filter (company-explicit-action-p) - - ;; Make RET trigger a completion if and only if the user has - ;; explicitly interacted with Company, instead of always - ;; doing so. + :filter (not (derived-mode-p 'eshell-mode)) ("<return>" . #'company-complete-selection) ("RET" . #'company-complete-selection)) - :bind* (;; The default keybinding for `completion-at-point' and - ;; `complete-symbol' is M-TAB or equivalently C-M-i. We - ;; already remapped those bindings to `company-manual-begin' - ;; above. Here we make sure that they definitely invoke - ;; `company-manual-begin' even if a minor mode binds M-TAB - ;; directly. - ("M-TAB" . #'jao-complete-at-point)) + + :bind* (;; The default keybinding for `completion-at-point' and + ;; `complete-symbol' is M-TAB or equivalently C-M-i. We + ;; already remapped those bindings to `company-manual-begin' + ;; above. Here we make sure that they definitely invoke + ;; `company-manual-begin' even if a minor mode binds M-TAB + ;; directly. + ("M-TAB" . #'jao-complete-at-point)) :diminish) @@ -1751,7 +1732,7 @@ ***** Attach image to message Use ~C-c C-p~ in message-mode. ***** Org-mime - #+BEGIN_SRC emacs-lisp + #+BEGIN_SRC emacs-lisp :load no (use-package org-mime :ensure t :init (setq org-mime-beautify-quoted-mail t) :bind (:map message-mode-map ("C-c M-o" . org-mime-htmlize))) |