summaryrefslogtreecommitdiffhomepage
path: root/init.org
diff options
context:
space:
mode:
Diffstat (limited to 'init.org')
-rw-r--r--init.org87
1 files changed, 4 insertions, 83 deletions
diff --git a/init.org b/init.org
index dbf4bff..33b718f 100644
--- a/init.org
+++ b/init.org
@@ -850,89 +850,6 @@
:bind (("s-n" . jao-hydra-ednc/body)
("H-s-n" . jao-hydra-ednc/body)))
#+end_src
-* Completion
-*** company
- #+begin_src emacs-lisp
- (use-package company
- :ensure t
- :custom
- ((company-global-modes '(clojure-mode
- clojurec-mode
- emacs-lisp-mode
- eshell-mode
- lisp-interaction-mode
- haskell-mode
- message-mode
- org-mode
- scheme-mode))
- (company-idle-delay 0.15)
- (company-lighter "")
- (company-lighter-base "")
- (company-show-numbers nil)
- (company-tooltip-limit 15)
- (company-tooltip-align-annotations t)
- (company-transformers '(company-sort-by-occurrence)))
-
- :config
- ;; Prevent non-matching input (which will dismiss the completions
- ;; menu), but only if the user interacts explicitly with Company.
- (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 completion-at-point] . #'jao-complete-at-point)
- ([remap complete-symbol] . #'jao-complete-at-point)
-
- ;; The following are keybindings that take effect whenever
- ;; the completions menu is visible, even if the user has not
- ;; explicitly interacted with Company.
- :map company-active-map
-
- ([remap scroll-up-command] . nil)
- ([remap scroll-down-command] . nil)
-
- ;; Make TAB always complete the current selection, instead of
- ;; only completing a common prefix.
- ("<tab>" . #'company-complete-selection)
- ("TAB" . #'company-complete-selection)
-
- ("C-h" . #'company-show-doc-buffer)
- ("M-." . #'company-show-location)
-
- ;; 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 (or (not (derived-mode-p 'eshell-mode))
- (company-explicit-action-p))
- ("<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))
-
- :diminish)
-
- (use-package company-math :ensure t :after company)
-
- (global-company-mode 1)
-
- #+end_src
-*** completion engine
- We can load either [[./consult.org][consult.org]] or [[./attic/counsel.org][counsel.org]] to configure
- completion engines:
- #+begin_src emacs-lisp
- (jao-load-org "consult")
- #+end_src
* Calendar, diary, weather
*** Diary
#+BEGIN_SRC emacs-lisp
@@ -1136,6 +1053,10 @@
#+END_SRC
* General editing
+*** Completion
+ #+begin_src emacs-lisp
+ (jao-load-org "completion")
+ #+end_src
*** Long lines
[[https://200ok.ch/posts/2020-09-29_comprehensive_guide_on_handling_long_lines_in_emacs.html][Comprehensive guide on handling long lines in Emacs - 200ok]]
#+begin_src emacs-lisp