diff options
Diffstat (limited to 'attic')
-rw-r--r-- | attic/misc.el | 60 |
1 files changed, 57 insertions, 3 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) |