summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--attic/misc.el60
-rw-r--r--custom/jao-custom-completion.el55
-rw-r--r--custom/jao-custom-eww.el16
3 files changed, 65 insertions, 66 deletions
diff --git a/attic/misc.el b/attic/misc.el
index a26f130..9575909 100644
--- a/attic/misc.el
+++ b/attic/misc.el
@@ -212,6 +212,60 @@
(goto-char (point-min))
(when (re-search-forward "^[Mm]essage-[Ii][Dd]: <?\\([^><]+\\)>?" nil t)
(match-string 1))))
+;;; company
+(use-package company
+ :ensure t
+ :custom ((company-backends '(company-capf
+ ;; company-bbdb
+ company-files
+ company-dabbrev
+ company-keywords))
+ (company-global-modes '(not slack-message-buffer-mode
+ circe-channel-mode
+ telega-chat-mode))
+ (company-format-margin-function nil) ;; #'company-text-icons-margin
+ (company-idle-delay 0.2)
+ (company-lighter "")
+ (company-lighter-base "")
+ (company-show-numbers nil)
+ (company-selection-wrap-around t)
+ (company-tooltip-limit 15)
+ (company-tooltip-align-annotations t)
+ (company-tooltip-offset-display 'lines)) ;; 'scrollbar
+
+ :config
+ (defun jao-complete-at-point ()
+ "Complete using company unless we're in the minibuffer."
+ (interactive)
+ (if (or (not company-mode) (window-minibuffer-p))
+ (completion-at-point)
+ (company-manual-begin)))
+
+ (defun jao-company-use-in-tab ()
+ (global-set-key [remap completion-at-point] #'jao-complete-at-point)
+ (global-set-key [remap completion-symbol] #'jao-complete-at-point)
+ (global-set-key (kbd "M-TAB") #'jao-complete-at-point))
+
+ (jao-company-use-in-tab)
+
+ :bind (:map company-active-map
+
+ ("<tab>" . company-complete-common-or-cycle)
+ ("TAB" . company-complete-common-or-cycle)
+
+ ("C-h" . company-show-doc-buffer)
+ ("M-." . company-show-location)
+ ("C-<return>" . company-complete-selection)
+ ([remap return] . company-abort)
+ ("RET" . company-abort)
+
+ :filter (or (not (derived-mode-p 'eshell-mode))
+ (company-explicit-action-p))
+ ("<return>" . company-complete-selection)
+ ("RET" . company-complete-selection))
+ :diminish)
+
+(global-company-mode 1)
;;; mu4e
(jao-load-path "mu4e")
(use-package mu4e
@@ -220,7 +274,7 @@
mu4e-change-filenames-when-moving nil
mu4e-completing-read-function 'completing-read
mu4e-display-update-status-in-modeline nil
- mu4e-get-mail-command nil ;; "run-mb.sh || [ $? -eq 1 ]"
+ mu4e-get-mail-command "true" ;; "run-mb.sh || [ $? -eq 1 ]"
mu4e-headers-show-threads t
mu4e-headers-sort-direction 'ascending
mu4e-headers-visible-columns 100
@@ -228,7 +282,7 @@
mu4e-hide-index-messages t
mu4e-index-cleanup t ;; don't do a full cleanup check
mu4e-index-lazy-check t ;; don't consider up-to-date dirs
- mu4e-maildir "~/tmp/mail.notmuch/"
+ mu4e-maildir "~/var/mail"
mu4e-split-view 'horizontal ;; 'vertical
mu4e-update-interval 300
mu4e-use-fancy-chars nil
@@ -277,7 +331,7 @@
(setq mu4e-sent-folder (jao-mu4e--refile-folder "sent"))
(setq mu4e-drafts-folder (jao-mu4e--refile-folder "drafts"))
(setq mu4e-trash-folder (jao-mu4e--refile-folder "trash"))
- (setq mu4e-refile-folder (jao-mu4e--refile-folder "folder"))
+ (setq mu4e-refile-folder (jao-mu4e--refile-folder "trove"))
(setq mu4e-contexts nil)
diff --git a/custom/jao-custom-completion.el b/custom/jao-custom-completion.el
index 88f0b4c..4bffd6d 100644
--- a/custom/jao-custom-completion.el
+++ b/custom/jao-custom-completion.el
@@ -73,61 +73,6 @@
(marginalia-mode 1)
-;;; company
-(use-package company
- :ensure t
- :custom ((company-backends '(company-capf
- ;; company-bbdb
- company-files
- company-dabbrev
- company-keywords))
- (company-global-modes '(not slack-message-buffer-mode
- circe-channel-mode
- telega-chat-mode))
- (company-format-margin-function nil) ;; #'company-text-icons-margin
- (company-idle-delay 0.2)
- (company-lighter "")
- (company-lighter-base "")
- (company-show-numbers nil)
- (company-selection-wrap-around t)
- (company-tooltip-limit 15)
- (company-tooltip-align-annotations t)
- (company-tooltip-offset-display 'lines)) ;; 'scrollbar
-
- :config
- (defun jao-complete-at-point ()
- "Complete using company unless we're in the minibuffer."
- (interactive)
- (if (or (not company-mode) (window-minibuffer-p))
- (completion-at-point)
- (company-manual-begin)))
-
- (defun jao-company-use-in-tab ()
- (global-set-key [remap completion-at-point] #'jao-complete-at-point)
- (global-set-key [remap completion-symbol] #'jao-complete-at-point)
- (global-set-key (kbd "M-TAB") #'jao-complete-at-point))
-
- (jao-company-use-in-tab)
-
- :bind (:map company-active-map
-
- ("<tab>" . company-complete-common-or-cycle)
- ("TAB" . company-complete-common-or-cycle)
-
- ("C-h" . company-show-doc-buffer)
- ("M-." . company-show-location)
- ("C-<return>" . company-complete-selection)
- ([remap return] . company-abort)
- ("RET" . company-abort)
-
- :filter (or (not (derived-mode-p 'eshell-mode))
- (company-explicit-action-p))
- ("<return>" . company-complete-selection)
- ("RET" . company-complete-selection))
- :diminish)
-
-(unless (display-graphic-p) (global-company-mode 1))
-
;;; corfu
(use-package corfu
:ensure t
diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el
index dc643fb..27c5821 100644
--- a/custom/jao-custom-eww.el
+++ b/custom/jao-custom-eww.el
@@ -1,6 +1,6 @@
;; -*- lexical-binding: t -*-
-;;; Integration with browse-url and afio
+;;; integration with browse-url and afio
(defun jao-eww-browse-url (url &rest r)
"Browse URL using eww."
(if (derived-mode-p 'eww-mode)
@@ -28,7 +28,7 @@
(setq mm-text-html-renderer #'jao-shr-html-renderer)
-;;; Opening URLs
+;;; opening URLs
(defun jao-eww-copy-link ()
(interactive)
(when-let (lnk (or (car (eww-links-at-point)) (eww-current-url)))
@@ -55,7 +55,7 @@
(eww-reload t))
(call-interactively 'eww-reload)))
-;;; Consult narrowing
+;;; consult narrowing
(with-eval-after-load "consult"
(defvar jao-eww-consult-history nil)
(defvar jao-eww-buffer-source
@@ -79,13 +79,13 @@
(seq-filter #'jao-www--buffer-p (buffer-list))))))
(jao-consult-add-buffer-source 'jao-eww-buffer-source "Web" ?e))
-;;; Images
+;;; images
(defun jao-eww-next-image ()
(interactive nil eww-mode)
(when-let (p (text-property-search-forward 'image-displayer nil nil t))
(goto-char (prop-match-beginning p))))
-;;; Close page and reopen
+;;; close page and reopen
(defvar jao-eww--closed-urls ())
(defun jao-eww-close ()
@@ -109,11 +109,11 @@
(interactive)
(jao-eww-reopen t))
-;;; Sessions
+;;; sessions
(use-package jao-eww-session
:custom ((jao-eww-session-file "~/.emacs.d/cache/eww-session.eld")))
-;;; Package
+;;; package
(use-package shr
:custom ((shr-width nil)
(shr-use-colors t)
@@ -163,7 +163,7 @@
("C-c C-w" . jao-eww-close)
("M-i" . eww-toggle-images))))
-;;; Fixes for shr image rendering
+;;; fixes for shr image rendering
(require 'shr)
(defun jao-shr--kill-nl (p)